Shortened if in if-else construct

The if-else construction can be used in a shortened form if we need to check whether a variable is true. In a broad sense, this means whether the variable is equal to the Boolean value True. In the short form, after if, it is enough to simply write the variable name without any conditions for comparison:

pythontst = True

if tst:
  print('+++') # this will work
else:
  print('---')

You can also use the shorthand if when the variable has values ​​equal to Boolean ones.

Values ​​that evaluate to False

All other values ​​are set to True.

Let's check if the variable tst is equal to the value True:

pythontst = 5

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

Tell me what will be the result of executing this code:

pythontst = []

if tst:
  print('+++')
else:
  print('---')
Задание 2

Tell me what will be the result of executing this code:

pythontst = None

if tst:
  print('+++')
else:
  print('---')
Задание 3

Tell me what will be the result of executing this code:

pythontst = -1

if tst:
  print('+++')
else:
  print('---')
Задание 4

Tell me what will be the result of executing this code:

pythontst = False

if tst:
  print('+++')
else:
  print('---')
Задание 5

Tell me what will be the result of executing this code:

pythontst = True

if tst:
  print('+++')
else:
  print('---')
Задание 6

Tell me what will be the result of executing this code:

pythontst = 'False'

if tst:
  print('+++')
else:
  print('---')
Задание 7

Tell me what will be the result of executing this code:

pythontst = '0'

if tst:
  print('+++')
else:
  print('---')
Задание 8

Tell me what will be the result of executing this code:

pythontst = ()

if tst:
  print('+++')
else:
  print('---')
Задание 9

Tell me what will be the result of executing this code:

pythontst = [0]

if tst:
  print('+++')
else:
  print('---')
Задание 10

Tell me what will be the result of executing this code:

pythontst = 1 - 1

if tst:
  print('+++')
else:
  print('---')
Задание 11

Tell me what will be the result of executing this code:

pythontst = {}

if tst:
  print('+++')
else:
  print('---')
Задание 12

Tell me what will be the result of executing this code:

pythontst = set()

if tst:
  print('+++')
else:
  print('---')
Задание 13

Tell me what will be the result of executing this code:

pythontst = ''

if tst:
  print('+++')
else:
  print('---')