``````

In :

print(1 in [0, 1, 2])

``````
``````

True

``````
``````

In :

print(100 in [0, 1, 2])

``````
``````

False

``````
``````

In :

print(1 in (0, 1, 2))

``````
``````

True

``````
``````

In :

print(1 in {0, 1, 2})

``````
``````

True

``````
``````

In :

print(1 in range(3))

``````
``````

True

``````
``````

In :

l = [0, 1, 2]
i = 0

if i in l:
print('{} is a member of {}.'.format(i, l))
else:
print('{} is not a member of {}.'.format(i, l))

``````
``````

0 is a member of [0, 1, 2].

``````
``````

In :

l = [0, 1, 2]
i = 100

if i in l:
print('{} is a member of {}.'.format(i, l))
else:
print('{} is not a member of {}.'.format(i, l))

``````
``````

100 is not a member of [0, 1, 2].

``````
``````

In :

l = [0, 1, 2]

if l:
print('not empty')
else:
print('empty')

``````
``````

not empty

``````
``````

In :

l = []

if l:
print('not empty')
else:
print('empty')

``````
``````

empty

``````
``````

In :

d = {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}

``````
``````

In :

print('key1' in d)

``````
``````

True

``````
``````

In :

print('value1' in d)

``````
``````

False

``````
``````

In :

print('value1' in d.values())

``````
``````

True

``````
``````

In :

print(('key1', 'value1') in d.items())

``````
``````

True

``````
``````

In :

print(('key1', 'value2') in d.items())

``````
``````

False

``````
``````

In :

print('a' in 'abc')

``````
``````

True

``````
``````

In :

print('x' in 'abc')

``````
``````

False

``````
``````

In :

print('ab' in 'abc')

``````
``````

True

``````
``````

In :

print('ac' in 'abc')

``````
``````

False

``````
``````

In :

print(10 in [1, 2, 3])

``````
``````

False

``````
``````

In :

print(10 not in [1, 2, 3])

``````
``````

True

``````
``````

In :

print(not 10 in [1, 2, 3])

``````
``````

True

``````
``````

In :

print(not (10 in [1, 2, 3]))

``````
``````

True

``````
``````

In :

print((not 10) in [1, 2, 3])

``````
``````

False

``````
``````

In :

print(not 10)

``````
``````

False

``````
``````

In :

print(False in [1, 2, 3])

``````
``````

False

``````
``````

In :

print([0, 1] in [0, 1, 2])

``````
``````

False

``````
``````

In :

print([0, 1] in [[0, 1], [1, 0]])

``````
``````

True

``````
``````

In :

l = [0, 1, 2]
v1 = 0
v2 = 100

``````
``````

In :

print(v1 in l and v2 in l)

``````
``````

False

``````
``````

In :

print(v1 in l or v2 in l)

``````
``````

True

``````
``````

In :

print((v1 in l) or (v2 in l))

``````
``````

True

``````
``````

In :

l1 = [0, 1, 2, 3, 4]
l2 = [0, 1, 2]
l3 = [0, 1, 5]
l4 = [5, 6, 7]

``````
``````

In :

print(set(l2) <= set(l1))

``````
``````

True

``````
``````

In :

print(set(l3) <= set(l1))

``````
``````

False

``````
``````

In :

print(set(l1).isdisjoint(set(l4)))

``````
``````

True

``````
``````

In :

print(not set(l1).isdisjoint(set(l3)))

``````
``````

True

``````
``````

In :

l = [0, 1, 2]

for i in l:
print(i)

``````
``````

0
1
2

``````
``````

In :

print([i * 10 for i in l])

``````
``````

[0, 10, 20]

``````