在命令行下执行如下命令,出现错误:
>>> age=3
File "<stdin>", line 1
age=3
^
IndentationError: unexpected indent
出现这种错误是因为错误的使用了缩进,在变量age
之前使用了缩进,去掉缩进即可解决:
在命令行下执行如下命令,出现错误:
>>> age=3
File "<stdin>", line 1
age=3
^
IndentationError: unexpected indent
出现这种错误是因为错误的使用了缩进,在变量age
之前使用了缩进,去掉缩进即可解决: