当前位置:网站首页>用户交互+格式化输出
用户交互+格式化输出
2022-07-31 01:46:00 【51CTO】
用户交互
1 2 3 4 5 6 7 |
|
输入密码时,如果想要不可见,需要利用getpass 模块中的 getpass方法,即:
1 2 3 4 5 6 7 8 9 10 |
|

使用控制台可以展示getpass模块功能如下图:

chmod 755 hello.py(加入权限755:7-->4:读取+2:写+1:执行,也就是所属用户可读可写可执行。5:4+1)
755 :所属用户、所属组、其他用户
查看数据是如何传递的:

实现:
username = input("username:")
password = input("password:")
print(username,password)
注意:shell中单引号和双引号是有区别的
实现:
username:123
password:123
123 123
注意:能不使用“+”加号拼接就不使用,太占内存了。
name:lnx
age:23
job:工程师
salary:34000
------info of lnx
Name: lnx
Age:23
Job:工程师
Salary:34000.00
用户交互
1 2 3 4 5 6 7 |
|
输入密码时,如果想要不可见,需要利用getpass 模块中的 getpass方法,即:
1 2 3 4 5 6 7 8 9 10 |
|

使用控制台可以展示getpass模块功能如下图:

边栏推荐
猜你喜欢

数字图像隐写术之卡方分布

Fiddler抓包模拟弱网络环境测试

【genius_platform软件平台开发】第七十四讲:window环境下的静态库和动态库的一些使用方法(VC环境)

case语句的综合结果,你究竟会了吗?【Verilog高级教程】

Meta元宇宙部门第二季度亏损28亿 仍要继续押注?元宇宙发展尚未看到出路

VS warning LNK4099: No solution found for PDB

倍增、DFS序

"Real" emotions dictionary based on the text sentiment analysis and LDA theme analysis

leetcode-1161:最大层内元素和

软件测试要达到一个什么水平才能找到一份9K的工作?
随机推荐
leetcode-952: Calculate max component size by common factor
VS warning LNK4099: No solution found for PDB
TiDB 操作实践 -- 备份与恢复
Basic Parameters of RF Devices 1
"Actual Combat" based on part-of-speech extraction in the field of e-commerce and its decision tree model modeling
软件测试报告有哪些内容?
TiDB 在长银五八消费金融核心系统适配经验分享
Xiaohei's leetcode journey: 104. The maximum depth of a binary tree
[Map and Set] LeetCode & Niu Ke exercise
加密生活,Web3 项目合伙人的一天
软件测试缺陷报告---定义,组成,缺陷的生命周期,缺陷跟踪产后处理流程,缺陷跟踪处理流程,缺陷跟踪的目的,缺陷管理工具
pycharm cannot run after renaming (error: can't open file...No such file or directory)
tkinter模块高级操作(二)—— 界面切换效果、立体阴影字效果及gif动图的实现
TiKV主要内存结构和OOM排查总结
leetcode-128: longest continuous sequence
蛮力法/邻接矩阵 广度优先 有向带权图 无向带权图
内网渗透——提权
Chi-square distribution of digital image steganography
87. Convert String to Integer
华为od 转骰子 js