Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def evil_gen():
a = [0, 0, 0, 0, 0]
while 1:
for i in range(10):
for j in range(5):
a[i] = [i+1]
yield (a)
def good_gen():
while 1:
for i in range(10):
a = [0, 0, 0, 0, 0]
for j in range(5):
a[i] = [i+1]
yield (a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.