import itertools partb= list(itertools.imap(lambda x: "".join(x), itertools.combinations('aApe',3))) parta = list(itertools.imap(lambda x: "".join(x), itertools.permutations('gRrAet!1',5))) print '\n'.join(list(itertools.imap(lambda x: "".join(x), (itertools.product(parta, partb)))))But in the end, this post is just to test out the syntax highlighting feature in javascript.
The blog was started under the title "mi facki lei cinri zasti" which translates to English as "I discover (all the) interesting things". It features my discoveries as well as my musings on them.
Samstag, 6. April 2013
Quick permutations
itertools for python are fun:
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen