Oct-06-2016, 11:35 PM
(Oct-06-2016, 12:58 AM)tinabina22 Wrote: #1. Create a loop that goes through each item in the password list
# simplest way to loop through a list is: for i in range(len(NAMEOFLIST))
The simplest way to loop through each item in the password list is
for item in NAMEOFLIST: print(item)As passwords is a list of list you can do the loop like this
passwords = [["yahoo","XqffoZeo"],["google","CoIushujSetu"]] for site, password in passwords: print(site, password)
Output:yahoo XqffoZeo
google CoIushujSetu
In the last post the reason the code starts all over at #1 after inputting a password is because there is no code to tell it to do anything but go back to the while loop.