当前位置:网站首页>用户交互+格式化输出
用户交互+格式化输出
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模块功能如下图:
边栏推荐
- Xiaohei's leetcode journey: 117. Fill the next right node pointer of each node II
- ROS Action通信
- 程序员转正述职报告/总结
- Xiaohei's leetcode journey: 104. The maximum depth of a binary tree
- MySQL的分页你还在使劲的limit?
- C语言_结构体指针数组函数选票系统
- 进程间通信学习笔记
- Centos 7.9安装PostgreSQL14.4步骤
- Bert usage and word prediction based on Keras_bert model
- 验证 XML 文档
猜你喜欢
1782. 统计点对的数目 双指针
The sword refers to offer17---print the n digits from 1 to the largest
软件测试要达到一个什么水平才能找到一份9K的工作?
【Map与Set】之LeetCode&牛客练习
Interprocess communication study notes
软件测试基础接口测试-入门Jmeter,你要注意这些事
tkinter模块高级操作(二)—— 界面切换效果、立体阴影字效果及gif动图的实现
VS warning LNK4099: No solution found for PDB
关于Redis相关内容的基础学习
两个有序数组间相加和的Topk问题
随机推荐
类似 MS Project 的项目管理工具有哪些
VS warning LNK4099: No solution found for PDB
Mysql: Invalid default value for TIMESTAMP
Set the browser scrollbar style
初识C语言 -- 数组
The sword refers to offer17---print the n digits from 1 to the largest
android的webview缓存相关知识收集
ROS Action通信
Distributed. Distributed lock
leetcode-399:除法求值
观察者(observer)模式(一)
Chi-square distribution of digital image steganography
【微信小程序】一文带你了解数据绑定、事件绑定以及事件传参、数据同步
Overview of prometheus monitoring
35. Reverse linked list
pc端判断当前使用浏览器类型
leetcode-952: Calculate max component size by common factor
tkinter模块高级操作(二)—— 界面切换效果、立体阴影字效果及gif动图的实现
《云原生的本手、妙手和俗手》——2022全国新高考I卷作文
ROS Action communication