I know this question is basic but I need some proper logical explanation for it and please excuse me for my ignorance. I am defined a function that returns True if the number 2 or 3 is in a list and False if it is not. It works fine for the 2 or 3. But also for others... I just do not understand why. Here is a glimpse of my function:
def has23(nums):
if (2 or 3 in nums):
return True
else:
return False
# has23([4,5])
# True # Why