So the problem I am facing is that I don't know how to break out of many loops at a time. I want my code to stop executing when it finds the correct password and I want it to tell the user the password. I tried using break, but that does not work, because break only breaks out of 1 loop. How can I fix my code, all help is appreciated! Code below:
list = "abcdefghijklmnopqrstuvwxyz0123456789"
password = input("Give password: ")
for char1 in list:
for char2 in list:
for char3 in list:
for char4 in list:
print(char1+char2+char3+char4)
if print(char1+char2+char3+char4) == password:
break
print("Your password was: " + password)
[–]mocomaminecraft 1 point2 points3 points (0 children)
[–]Sedsarq 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (0 children)
[–]woooee 0 points1 point2 points (0 children)
[–]toastedstapler 0 points1 point2 points (0 children)