python中出现IndentationError:unindent does not match any outer indentation level是什么问题?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 00:11:49
python中出现IndentationError:unindent does not match any outer indentation level是什么问题?

python中出现IndentationError:unindent does not match any outer indentation level是什么问题?
python中出现IndentationError:unindent does not match any outer indentation level是什么问题?

python中出现IndentationError:unindent does not match any outer indentation level是什么问题?
Read-Eval-Print-Loop问题……就是说,实时解释器中,每输入完一个程序段,就必须空一行,让前面的...变成>>>,以输入下一段程序.
注意sayhello()上面的空行.


如果你把代码写在一个文件里,然后运行,就不一定要写这个空行啦(虽然为了美观,强烈推荐保留空行)