Skip to content

Instantly share code, notes, and snippets.

@rahduro
Created March 7, 2017 22:13
Show Gist options
  • Save rahduro/40b0a493912c9ab0ffac939534bdd5fb to your computer and use it in GitHub Desktop.
Save rahduro/40b0a493912c9ab0ffac939534bdd5fb to your computer and use it in GitHub Desktop.
some python snippets
# 4 digits binary numbers in increasing order
from itertools import product
map(lambda i: '{}{}{}{}'.format(i[0], i[1], i[2], i[3]), product(range(2), repeat=4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment