标签:inpu lse and python pass 循环 登录 bsp int
用python实现一个简单的if循环语句:
密码需要用密文:
import getpass 调用getpass库,实现密码密文输入
_username = ‘alex‘
_password = ‘123‘
username =input("username:")
password = getpass.getpass("password") 需要到doc窗口来执行python程序 (需要明文的:password = input("password")即可)
print(username,password)
if _username ==username and _password == password
print("欢迎登录.......".format(name=(suername))) format有些不理解
else:
print("密码错误.......")
标签:inpu lse and python pass 循环 登录 bsp int
原文地址:https://www.cnblogs.com/GuoDong1986/p/9235360.html