import getpass # 导入模块
username = input('username: ')
# getpass模块中,有一个方法也叫getpass
password = getpass.getpass('password: ')
if username == 'bob' and password == '123456':
print('Login successful')
else:
print('Login incorrect')
import getpass # 导入模块
username = input('username: ')
# getpass模块中,有一个方法也叫getpass
password = getpass.getpass('password: ')
if username == 'bob' and password == '123456':
print('Login successful')
else:
print('Login incorrect')
本文标题:12-判断练习:用户名和密码是否正确
本文链接:https://www.haomeiwen.com/subject/xgazmftx.html
网友评论