üretici fonksiyonlar for döngüsü

This commit is contained in:
Mert Gör 🇹🇷 2023-09-06 18:51:12 +03:00
parent f5cd0e43d5
commit 6fed23b2ed
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,13 @@
def foo():
print('one')
yield 1
print('two')
yield 2
print('three')
yield 3
for i in foo():
print(i)
l = list(foo())
print(l)