Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save harlowja/ff81e1497498edba8aef111121241882 to your computer and use it in GitHub Desktop.
Save harlowja/ff81e1497498edba8aef111121241882 to your computer and use it in GitHub Desktop.
>>> def reversed_range(source, starts_at, ends_at):
... while starts_at >= ends_at:
... yield source[starts_at]
... starts_at -= 1
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment