nums = [1, 2, 3, 4]
choice = input()
if choice.isnumeric() and choice in nums:
print("First")
else:
print("Second")
It prints out Second, can anyone explain why? I assume because it reads the number as a string since its input()
rather than int(input())
, and then it's false
because list members are int
, if that's the case, is it better to write the numbers in the list as strings, or is there another way to make it work?