CSD Shell script match case example written
This commit is contained in:
parent
a023054732
commit
f82311b62d
2 changed files with 17 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
2024-06-30 hwpplayer1 <hwpplayer1@debian>
|
||||
|
||||
* python/csd_case_match.py: CSD shell script match case example written
|
||||
* python/csd_case_match_2.py: CSD Shell Script match case example (as x) written
|
||||
|
||||
* Python/csd_case_match.py: CSD shell script match case example written
|
||||
|
||||
2024-06-23 hwpplayer1 <hwpplayer1@debian>
|
||||
|
||||
|
|
14
python/csd_case_match_2.py
Normal file
14
python/csd_case_match_2.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
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')
|
||||
|
Loading…
Add table
Reference in a new issue