more while examples

This commit is contained in:
Mert Gör 🇹🇷 2023-05-20 13:38:27 +03:00
parent de74c83f61
commit f23f2bd4ac
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 9 additions and 0 deletions

4
walrus.alternative.2.py Normal file
View File

@ -0,0 +1,4 @@
s = input('Bir yazı giriniz:')
while s != 'quit':
print(s[::-1])
s = input('Bir yazı giriniz:')

5
walrus.alternative.py Normal file
View File

@ -0,0 +1,5 @@
while True:
s = input('Bir yazı giriniz:')
if s == 'quit':
break
print(s[::-1])