I keep getting an "Invalid syntax" message with no explanation


#1



https://codecademy.com/courses/python-beginner-BxUFN/2/6?curriculum_id=4f89dab3d788890003000096#


File "python", line 16
bool_five = (2 == 2) not "Bravo" == "Alpha"
^
SyntaxError: invalid syntax


It was supposed to give me the greenlight on that boolean like it did on the previous four. Yet it keeps telling me that this particular quotation mark is invalid.


File "python", line 16
    bool_five = (2 == 2) not "Bravo" == "Alpha"
                                   ^
SyntaxError: invalid syntax


#2

not can only be written on an operand expression, It is not an implicit and, nor an or, one of which must accompany it between operands.

or not

and not

#3

Okay so I have to type "or" or "and" before "not." Got it. Thank you.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.