Мне нужно for
l oop, чтобы не продолжать просматривать словарь после того, как значение usernameMatch
bool было изменено на False
.
def username():
usernameMatch = True
while usernameMatch == True:
print ('Username:')
username = input()
print ('checking username......\n')
for key in usernameDictionary:
if username == key:
print('match')
else:
usernameMatch == False