Код: Выделить всё
x = "hello"
match x:
case "hi":
print(x)
case "hey":
print(x)
default:
print("not matched")
Подробнее здесь: https://stackoverflow.com/questions/688 ... match-case
Код: Выделить всё
x = "hello"
match x:
case "hi":
print(x)
case "hey":
print(x)
default:
print("not matched")