使用input()函数,(python2中是raw\_input())从键盘读取输入的字符
\>>> input("name:")
name:tom
'tom'
\>>>
inpu()输出的结果是str类型的,例如
\>>> name=input("name:")
name:454677
\>>> type(name)
<class 'str'>
\>>> name=input("name:")
name:hello
\>>> type(name)
<class 'str'>
\>>>