0

How to print a,b,c values by using custom generator

How to print a,b,c values by using custom generator

3rd Feb 2022, 5:40 AM
Manoj Bhaagam
1 Respuesta
+ 2
myiterator = (c for c in "abc") for i in range(3): print(next(myiterator)) use a list or another iterable instead of "abc"
3rd Feb 2022, 8:15 AM
Oma Falk
Oma Falk - avatar