Jun-20-2017, 10:21 PM
It's almost always better to iterate directly over the items in a list, rather than over the indexes of the list:
for pass in pass_list: if pass[0] == search_user: found = pass[1] breakNote that pass is a list of two items, so I'm grabbing the first item in that sub-list with the zero index. You can also use tuple assignment to make it even easier:
for user, pass in pass_list: if user == search_user: found = pass break
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures