if
if test1:
    state1
elif test2:
    state2
else:
    state3a = int(input())
if a < -5:
    print('Low')
elif -5 <= a <= 5:
    print('Mid')
else:
    print('High')// таку конструкцію
if X:
    A = Y
else:
    A = Z
// можна замінити такою, більш стислою:
A = Y if X else ZLast updated