match while example and as x:
This commit is contained in:
parent
f0c6948b23
commit
bc6bda612d
13
match.while.2.py
Normal file
13
match.while.2.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
while True:
|
||||
cmd = input('CSD>').strip()
|
||||
match cmd:
|
||||
case 'delete' | 'remove' | 'erase' as x:
|
||||
print(f'silme işlemi "(x)" komutu ile yapılıyor')
|
||||
case 'copy':
|
||||
print('kopyalama işlemi')
|
||||
case 'rename':
|
||||
print('isim değiştirme işlemi')
|
||||
case 'exit' | 'quit':
|
||||
break
|
||||
case _:
|
||||
print('geçersiz komut!')
|
|
@ -10,4 +10,4 @@ while True:
|
|||
case 'exit' | 'quit':
|
||||
break
|
||||
case _:
|
||||
print('geçersiz komut')
|
||||
print('geçersiz komut!')
|
||||
|
|
Loading…
Reference in New Issue
Block a user