python学习随笔1:python用户交互
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)
相关推荐
huha 2020-10-16
TLROJE 2020-10-26
echoes 2020-08-20
nercon 2020-08-01
zhanghaibing00 2020-06-28
Aveiox 2020-06-25
henryzhihua 2020-06-21
zhoutaifeng 2020-06-17
liangzhouqu 2020-06-16
TONIYH 2020-06-11
开心就好 2020-06-10
x青年欢乐多 2020-06-06
KyrieHe 2020-06-03
bertzhang 2020-06-02
haokele 2020-05-29
niehanmin 2020-05-28
davidliu00 2020-05-26