Demoprogramme
This commit is contained in:
19
teil24/match_list.py
Normal file
19
teil24/match_list.py
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user