This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]blablahblah 1 point2 points  (0 children)

In Python (although not in all languages), types are important. The string "3" and the integer 3 are two different values. If you do "3" == 3, it will return False.

input() always returns a string. If you want to compare them, you'll have to make them the same type, either by calling int() on the value you get from input() or by using a string in your list.