python 的输入与输出
一、python 输入
1.1 使用内建函数 input()
>>> input()
"hello world"
'hello world'
>>>
----这里输入字符串需要带 引号,输入数字则不用
>>> input()
1
1
>>>
----错误例子,会报错
>>> input()
hello world
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
input()
File "<string>", line 1
hello world
^
SyntaxError: unexpected EOF while parsing
>>>
----在 input() 时,可以提示
一下,需要输入什么,例: