当前位置:主页 > >

python3 中的raw_input() 和input

时间:2020-01-01 09:22:34 | 栏目: | 点击:

python3将raw_input和input进行了整合,只有input了,所以使用的时候需要特别注意。

print("How old are you?"),
age = input()
print ("so %s old" %age )

其接受任意输入,将所有输入默认为字符串处理,并返回字符串类型。

您可能感兴趣的文章:

相关文章