Problem with algorithm
paddy3118 at googlemail.com
Fri Apr 13 12:20:42 CEST 2007
On Apr 13, 8:16 am, "Jia Lu" <Roka... at gmail.com> wrote:
> > for m in test:
> > for n in test:
> > for o in test:
> > for p in test:
> > print m+n+o+p
> Thanx for your anwser.
> But if I consider about a combination of over 26 letter's list just
> Need I write 26 for loops to do this?
> Jia LU
Try this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/502199
You could then write something like:
for thiscomb in comb2( *([string.lowercase]*26) ):
Mind you, it generates a lot of combinations.
More information about the Python-list