IndentationError: unindent does not match any outer indentation level的问题

用python编个作业,我先用的notepad++编辑的,然后回寝之后又用pycharm编辑的,在我写完一个函数测试运行的时候就出现了这个问题,实际上是缩进的问题,因为notepad++的换行是用的空格,而pycharm换行缩进后用的是tab,所以缩进就出问题了,找了很半天才发现这么回事,很烦人啊!!!发火


IndentationError: expected an indented block  这个也是类似的错误  把缩进换成统一的tab或者space就ok了微笑

你可能感兴趣的:(python,测试,作业)