当前位置: 移动技术网 > IT编程>开发语言>Java > Python3中input的用法

Python3中input的用法

2018年05月30日  | 移动技术网IT编程  | 我要评论

input()是一种获取用户输入的方法,从标准输入中读入一个字符串,并自动忽略换行符\n。

换行符\n

>>> print('a\nb')
a
b

>>> user_money = input("please input your money:")
please input your money:1 # 1 是我自己输入的
>>> print(user_money)
1

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网