Skip to content

Instantly share code, notes, and snippets.

@Winterflower
Created June 29, 2014 09:08
Show Gist options
  • Save Winterflower/b7baa770c60650d724ef to your computer and use it in GitHub Desktop.
Save Winterflower/b7baa770c60650d724ef to your computer and use it in GitHub Desktop.
another permutation
from itertools import product
for roll in product(['A','C','T','G'], repeat = 6):
print(roll)
allkmers=[]
kmers=product(['A','C','T','G'],repeat=6)
for k in kmers:
temp=''.join(k)
allkmers.append(temp)
for kmers in allkmers:
print kmers
print allkmers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment