Skip to content

Instantly share code, notes, and snippets.

@mgrabovsky
Created December 11, 2013 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgrabovsky/7912279 to your computer and use it in GitHub Desktop.
Save mgrabovsky/7912279 to your computer and use it in GitHub Desktop.
Generate a sequence akin to 1, 2, 5, 10, 20, 50, ... Useful for log scales and such.
import itertools
([1, 2, 5][i % 3] * 10**(i // 3) for i in itertools.count(0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment