Skip to content

Instantly share code, notes, and snippets.

@z00sts
Created January 20, 2020 16:21
Show Gist options
  • Save z00sts/8e406bda92dd4b7f014bd8df386b35ef to your computer and use it in GitHub Desktop.
Save z00sts/8e406bda92dd4b7f014bd8df386b35ef to your computer and use it in GitHub Desktop.
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