üretici fonksiyonlar for döngüsü
This commit is contained in:
parent
f5cd0e43d5
commit
6fed23b2ed
13
python-temel/uretici.fonksiyonlar.dolasım.nesnesi.for.py
Normal file
13
python-temel/uretici.fonksiyonlar.dolasım.nesnesi.for.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user