Skip to content

Instantly share code, notes, and snippets.

@ktechmidas
Created March 31, 2017 02:59
Show Gist options
  • Save ktechmidas/a718fd36803c48da23cebb3214b7599f to your computer and use it in GitHub Desktop.
Save ktechmidas/a718fd36803c48da23cebb3214b7599f to your computer and use it in GitHub Desktop.
l = ['m4','r2','r3']
n = 7
print itertools.islice(itertools.cycle(l), n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment