введите здесь описание изображения
Код: Выделить всё
userNames = ["User1", "User2", "User3", "User4", "User5"]
print("Welcome to AQA User Registration")
for x in range(3):
userName = input("New username: ")
if userName in userNames:
print("The username is already used")
else:
break
for x in range(3):
userPassword = input("Password (12 characters or more): ")
if len(userPassword) < 12:
print("The password is not long enough")
else:
break
print("Your username is " + userName)
print("Your password is " + userPassword)
Подробнее здесь: https://stackoverflow.com/questions/791 ... d-password