+ 1
invalid syntax
letters=[âaâ, âbâ, âzâ] if (â2â) in letters: print (âYESâ) Result: File "<string>", line 2 letters=[âaâ, âbâ, âzâ] ^ SyntaxError: invalid syntax
3 Antworten
+ 9
You have a font problem. The code itself is working.
+ 6
You are using slanted quotation marks - possibly you pasted the code from a Word document? If you are coding outside a code editor, use plain text.
letters = ['a', 'b', 'z']
if "2" in letters:
print("YES 2")
if "a" in letters:
print("YES a")
0
same as mine,but the font is correct