import random
num_list = []
for i in range(0, 100 + 1):
num_list.append(i)
for i in range(50):
output = random.sample(num_list, 3)
print(output)
if 0 or 100 in output:
print('yes')
I am trying to print a list of 3 numbers in random (0 to 100) for 50 times. When 0 or 100 is on the list, I want to print 'yes' in the console. However, when I run the code, only when the list has 100 shows 'yes', but not in the situations when 0 is on the list. What causes the problem? Did I use the 'or' operator mistakenly?