0
As you can see the program below "generates" several strings of unique characters. The intention here is not to create a specific algorithm for this, it is just an example. The case study is about ways to reduce the amount of loops nested in this type of occasion.
For general purposes follow the code:
char = [chr(i) for i in range(33, 123)]
for one in char:
for two in char:
for three in char:
for four in char:
for five in char:
for six in char:
for seven in char:
for eight in char:
for nine in char:
print(one, two, three, four, five, six, seven, eight, nine)
Search about the module
itertools
– Woss
I had to run it to understand that it’s a brute force algorithm for breaking passwords.
– Augusto Vasques