Files
pythonkurs/teil24/match_list.py
2024-02-02 13:47:29 +01:00

20 lines
228 B
Python

def print_match(wert):
print(f'wert={wert}')
match wert:
case 1|2:
print('1 oder 2')
case 3|4:
print('3 oder 4')
case _:
print('unbekannt')
print_match(1)
print_match(3)
print_match(5)