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

边栏推荐
猜你喜欢

最高月薪20K?平均薪资近万...在华为子公司工作是什么体验?

太阳能板最大面积 od js

The sword refers to offer17---print the n digits from 1 to the largest

MySql installation and configuration super detailed tutorial and simple method of building database and table

【Mysql】——索引的深度理解

倍增、DFS序

I have been working in software testing for 3 years, how did I go from just getting started to automated testing?

软件测试报告有哪些内容?

想要写出好的测试用例,先要学会测试设计

What are the project management tools like MS Project
随机推荐
【微信小程序】一文带你了解数据绑定、事件绑定以及事件传参、数据同步
ROS Action通信
The difference between 4G communication module CAT1 and CAT4
来自一位女测试工程师的内心独白...
Distributed. Distributed lock
[WeChat applet] This article takes you to understand data binding, event binding, event parameter transfer, and data synchronization
JS逆向之浏览器补环境(一)
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
leetcode-952:按公因数计算最大组件大小
pc端判断当前使用浏览器类型
Jetpack Compose学习(8)——State及remeber
PDF 拆分/合并
《云原生的本手、妙手和俗手》——2022全国新高考I卷作文
华为od 转骰子 js
keep-alive cache component
Jiuzhou Cloud was selected into the "Trusted Cloud's Latest Evaluation System and the List of Enterprises Passing the Evaluation in 2022"
软件测试要达到一个什么水平才能找到一份9K的工作?
【Map与Set】之LeetCode&牛客练习
Bert usage and word prediction based on Keras_bert model
keep-alive缓存组件