Last active
May 20, 2018 23:28
-
-
Save tristaaan/9df6fbb9b0af79114dc5d15a902f1354 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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