1,编写用户名及密码然后加密
import getpass
username = input("username")
password = getpass.getpass("password")
print(username,password)
变秘文需要有模块,调用标准库(import中有的,不需要安装的库,叫做标准库)
import getpass,可以将明文变成密文
'''
想最快的入门Python吗?请搜索:"泉小朵",来学习Python最快入门教程。
也可以加入我们的Python学习Q群:902936549,送给每一位python的小伙伴教程资料。
'''
import getpass
username = input("username")
password = getpass.getpass("password")
print(username,password)
2. 想要判断用户名和密码对不对,所以我们需要判断
username_ = "han"
password_ = "123"
username = input("username:")
password = input("password:")
print(username,password)
if username_ == username and password_ == password:
print("w