How to try all combinations of two files? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to try all combinations of two files?

How do I try all possible combinations of two files in a python3.x program, for example I have 3 names in file 1 and 3 or more passwords in file 2, I want the program to try all possible combinations, any suggestion?

10th Dec 2017, 4:25 PM
giri
giri - avatar
2 Answers
+ 2
@Dextozz, thanks, will try that
10th Dec 2017, 4:51 PM
giri
giri - avatar
+ 1
Don't know python so i can't help you directly. But you could maybe have a while loop that goes from beginning to the end of the file line by line and take those values into a list (or array if you know how many lines you have). Then through 2 for loops compare all solutions
10th Dec 2017, 4:49 PM
Dextozz
Dextozz - avatar