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.
If you REALLY want to brute force it, try this, but it will take you a ridiculous amount of time:
On a smaller example, where list = ‘ab’ and we only go up to 5, this prints the following: