On Apr 12, 10:16�pm, "Jia Lu" <[EMAIL PROTECTED]> wrote: > Hi all. > �I want to create a large list like: > > aaaa ~ zzzz > > Is there any good algorithm to do this?
Sure. test = '01' for m in test: for n in test: for o in test: for p in test: print m+n+o+p ## 0000 ## 0001 ## 0010 ## 0011 ## 0100 ## 0101 ## 0110 ## 0111 ## 1000 ## 1001 ## 1010 ## 1011 ## 1100 ## 1101 ## 1110 ## 1111 Now just change test='01' to test='abcdefghijklmnopqrstuvwxyz'. > > Thanx > > Jia Lu
-- http://mail.python.org/mailman/listinfo/python-list