def SimpleSymbols(string): for letter in range(len(string)) : if ord((string[letter]).lower()) >= ord('a') and ord((string[letter]).lower()) <= ord('z'): if ord(string[letter-1]) == ord('+') and ord(string[letter+1]) == ord('+'): break else: return False return True print SimpleSymbols(raw_input())One of the main problem is that if the first symbol is a letter, the second letter is a + and the last letter is also a + it returns True. I understand why it does it (Because when it checks for the +x+ sequence, it will check for + signs around the letter, and if the first symbole of the string is a letter it will look for -1 wich is the last letter of the string), but I'm not sure how to actually resolve it. Also, when I send the code for checks, all the results are wrong, but when I test them, they look fine. Why would that be? I don't want a direct answer, maybe just a direction on where to look Thanks a lot!