Day 18_成員運算子 (Membership Operators)
18-1. in
式子:
x = '123'
print('1' in x)
結果:
True
式子:
x = '123'
print('12' in x)
結果:
True
式子:
x = '123'
print('5' in x)
結果:
False
18-2. not in
式子:
x = '123'
print('5' not in x)
結果:
True
式子:
x = '123'
print('1' not in x)
結果:
False
式子:
x = '123'
print('12' not in x)
結果:
False