Wednesday, November 20, 2019

list elements check using print

a=[10,20,30]
print(10 in a)
print(100 in a)
print(100 not in a)

output:
True
False
True

No comments:

Post a Comment

python class topic video