Skip to content

Instantly share code, notes, and snippets.

@eggplants
Created December 9, 2024 16:57
Show Gist options
  • Save eggplants/d42a1b1b99db13fe9c0a60e504de9c86 to your computer and use it in GitHub Desktop.
Save eggplants/d42a1b1b99db13fe9c0a60e504de9c86 to your computer and use it in GitHub Desktop.
Ruby's `(0..).each { p _1; sleep 1;}` in Python
import time
for idx, _ in enumerate(iter(int, 1)):
print(idx)
sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment