码迷,mamicode.com
首页 > 编程语言 > 详细

Python3 密文输入

时间:2019-01-12 21:48:53      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:环境   span   and   log   string   arm   input   password   port   

 1 #密文输入
 2 import getpass
 3 import string
 4 
 5 _username = "陈奎元"
 6 _password = "123aaa"
 7 username = input("UserName:")
 8 password = getpass.getpass("PassWord:")
 9 #getpass在pycharm中不好用,可以用cmd环境试验
10 if _username == username and _password == password:
11     print("Welcome {username} logoin".format(username=username))
12     print(f"Welcome {username} logoin")
13 else:
14     print("invalid username and password!")

 

Python3 密文输入

标签:环境   span   and   log   string   arm   input   password   port   

原文地址:https://www.cnblogs.com/skings/p/10260991.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!