I need to generate every possible combination from a given charset to a given range. Like,
charset=list(map(str,"abcdefghijklmnopqrstuvwxyz"))
range=10
And the out put should be,
[a,b,c,d..................,zzzzzzzzzy,zzzzzzzzzz]
I know I can do this using already in use libraries.But I need to know how they really works.If anyone can give me a commented code of this kind of algorithm in Python or any programming language readable,I would be very grateful.
list(map(str, "abc..."))is the most useless piece of code ever. - JBernardolist()returns a list.map()returns a list, too. If your input really needs to be a list (which I doubt), usecharset=list(string.lowercase)- kojiro