junk = "ghGDakGsdDhggkHjahsghasdkgFSSoGDS"
letter_to_find = 'o'

junk = "l" + junk + "l" 		# in case the sequence in question is
								# at the edge of the string
bitstr = "".join(str(int(x.isupper())) for x in junk)
letter = junk[bitstr.index('011101110') + 4]

print("Letter = %s. Correct? %s" % (letter, letter == letter_to_find))