当前位置:网站首页>用户交互+格式化输出
用户交互+格式化输出
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模块功能如下图:

边栏推荐
- Gateway路由的配置方式
- Xiaohei's leetcode journey: 117. Fill the next right node pointer of each node II
- "Cloud native's master, master and vulgar skills" - 2022 National New College Entrance Examination Volume I Composition
- MySql的安装配置超详细教程与简单的建库建表方法
- C语言小程序 -- 常见经典练习题
- MySQL (6)
- Google官方控件ShapeableImageView使用
- 九州云获评云计算标准化优秀成员单位
- 第一学年课程期末考试
- coldfusion8后台计划任务拿shell
猜你喜欢

ROS Action communication

leetcode-952: Calculate max component size by common factor

内网渗透——提权

Mysql: Invalid default value for TIMESTAMP

The Meta Metaverse Division lost 2.8 billion in the second quarter, still want to continue to bet?Metaverse development has yet to see a way out

观察者(observer)模式(一)

Google官方控件ShapeableImageView使用

手把手教你配置Jenkins自动化邮件通知

What have I experienced when I won the offer of BAT and TMD technical experts?

最大路径和
随机推荐
MySQL (6)
TiDB 在多点数字化零售场景下的应用
【AcWing 第62场周赛】
C语言小程序 -- 常见经典练习题
Word 表格跨页,仍然显示标题
android的webview缓存相关知识收集
【Mysql】——索引的深度理解
Multiplication, DFS order
【网络安全】文件上传靶场通关(1-11关)
【AcWing 62nd Weekly Game】
TiDB 操作实践 -- 备份与恢复
Charging effect simulation
Is there a way to earn 300 yuan a day by doing a side business?
What have I experienced when I won the offer of BAT and TMD technical experts?
华为od 转骰子 js
[WeChat applet] This article takes you to understand data binding, event binding, event parameter transfer, and data synchronization
Fiddler抓包模拟弱网络环境测试
leetcode-399:除法求值
pycharm cannot run after renaming (error: can't open file...No such file or directory)
力扣每日一题-第46天-704. 二分查找