+ 1

I need your help .Please explain this code.It is verify difficult to understand for me.

from itertools import chain, product def bruteforce(charset, maxlength): return (''.join(candidate) for candidate in chain.from_iterable(product(charset, repeat=i) for i in range(1, maxlength + 1)))

3rd May 2020, 11:08 AM
David Boga
David Boga - avatar
1 Respuesta
+ 1
You can link the code because I think this is not the full code also that return should be at last ,looks wrong code to me
3rd May 2020, 11:20 AM
Abhay
Abhay - avatar