Объяснение:
password = 'qwerty123'
while True:
attempt = str(input('Enter the password: '))
if attempt == password:
print('Вы вошли в систему!')
break
else:
print('Попробуйте ещё!')