python3 input函数
来源:互联网 发布:php语法基础 编辑:程序博客网 时间:2024/06/05 09:54
python3 里 input() 默认接收到的是 str 类型。
所以如果你输入的是数值,还需要自己转一下类型。
例
a = input("input:")print(a)print(type(a))print(int(a))print(type(int(a)))
输入10,则输出:
input:10<class 'str'>10<class 'int'>
阅读全文
1 0
- Python3中的input函数
- Python3:input()函数
- python3 input函数
- python3的input问题
- python学习——Python2.0与Python3.0中的input()函数
- python3 函数
- Python3 函数
- Python3函数
- python3 函数
- Python3函数
- Python3 函数
- python3函数
- Python3 函数
- Python3 函数
- Python3 函数
- python3 函数
- python3中input的问题
- python2 与python3 input变化
- 2017英特尔中国行业峰会 | 释放数据价值,推动企业转型
- 监听input框输入的监听事件
- Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System
- 剪切平面设置
- 集合
- python3 input函数
- Python爬取糗事百科,并利用Wordcloud进行展示
- ubuntu 国内源列表
- 软件测试之robot framework测试平台搭建
- 记一次重构
- 经典算法00例 3
- h5移动端拨打电话和发送短信
- IntelliJ IDEA使用教程 (总目录篇)转载
- Java 弱引用WeakReference