Feb-03-2022, 03:47 PM
I saw similar examples in https://www.programiz.com/python-programming/iterator
Generator are in curly brackets like a tuple but they are object that return a list.
I like the use you made of list (zip) much fater than while:
Generator are in curly brackets like a tuple but they are object that return a list.
I like the use you made of list (zip) much fater than while:
coordinate = [] y = 0 while y < 10: x = 0 while x < 10: coordinate.append((x,y)) x += 1 coordinate.append((x,y)) y += 1 for x in coordinate: print(x)Thanks for the tips.