Checking for presence in Python

In conditions, you can also check for the presence of an element. For this, the in operator is used.

Let us have a variable tst and a list lst:

pythontst = 3
lst = [1, 2, 3]

Let's check if the variable value is in the list:

pythonif tst in lst:
  print('+++') # this will work
else:
  print('---')

Using the not in construct, you can check whether a variable's value is not in a list:

pythonif tst not in lst:
  print('+++')
else:
  print('---') # will this work
Задание 1

Given a variable and a list:

pythontst = 'x'
lst = ['x', 'y', 'z', 'w']

Check if the variable is in the list.

Задание 2

Given a variable and a set:

pythontst = '1'
st = {1, 2, 3, 4, 5}

Check that the variable is not in the list.

Задание 3

Given a variable and a string:

pythontst = '3'
txt = '123456'

Check if the variable exists in the string.

Задание 4

The following code is given:

pythontst = 3
lst = ['a', 'b', 'c', 'd', 'e']
res = lst[tst]
tlp = ('a', 'b', 'c')

if res in tlp:
  print('+++')
else:
  print('---')

Tell me what will be output to the console.