Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
reverse_big.py
def reverse_big(gen):
yield from reversed(gen)
g1 = range(10**10)
for n, item in enumerate(reverse_big(g1)):
if n > 10:
break
print(item)
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.