标签:NPU 用户交互 pre print pass password 模块 格式 use
1.输入使用input
username = input("username:") password = input("password:") print(username,password)
2.输入打印出格式
name = input("name:") age = input("age:") job = input("job:") info =‘‘‘_____info of %s____ name:%s age:%s job:%s ‘‘‘ %(name,name,age,job) print(info)
name = input("name:") age = input("age:") job = input("job:") info =‘‘‘_____info of name____ name:name age:age job:job ‘‘‘ .format(name=name,age=age,job=job) print(info)
3.密码输入密文模块
import getpass username = input("username:") password = getpass.getpass("password:") print(username,password)
标签:NPU 用户交互 pre print pass password 模块 格式 use
原文地址:https://www.cnblogs.com/heyue13/p/12336316.html