python2.7下input()函数输入参数

使用input()函数,在运行时输入字符需要用引号括起来。但在交互模式下不需要

question:

Traceback (most recent call last):

File "", line 1, in
input_A = input("Input: ")
File "", line 1, in
NameError: name 'abc' is not defined

python2.7下input()函数输入参数_第1张图片

python2.7下input()函数输入参数_第2张图片

Answerhttp://www.cnblogs.com/way_testlife/archive/2011/03/29/1999283.html

你可能感兴趣的:(python2.7下input()函数输入参数)