auth_data = {'username': 'password', 'anon': '1234567'}
while True:
uname = input('username: ')
if pwd := auth_data.get(uname):
break
print('no such username')
upwd = input('password: ')
if upwd == pwd:
print('success')
else:
print('bad')