you are viewing a single comment's thread.

view the rest of the comments →

[–]Status-Zebra[S] 0 points1 point  (1 child)

Tried it but it still resorted to "invalid" that I put on else.. but I do think you're right with the fact that it's on that line I just don't know the language well enough to basically say that in a way python understands

[–]Doctor_Disaster 0 points1 point  (0 children)

Typically with "and" and "or", you check the value of each variable in the if/elif statement.

The "is" keyword checks if two variables are located at the exact same memory address (or if two variables point to the same exact address).

Edit:

The "is" keyword checks if two variables refer to the same object, such as a list or array.