raw_input input

raw_input[prompt]

#prompt是显示在控制台的提示文字

# 返回值是字符串


x = raw_input("x:")

print type(x)

x:1234

<type 'str'>


input[prompt]

#prompt是显示在控制台的提示文字

# 返回值是int

x = input("x:")

print type(x)

x:1234

<type 'int'>


你可能感兴趣的:(raw_input input)