问题如下图所示,应该是缩进问题,但是我看都对齐了,不知道问题出现在哪,后来才发现,虽然都对齐了,但是空格和tab键是不一样的
这两行代码虽然对齐了但是第二行会报错的原因是,第一行是tab键,第二行则是用的四个空格
但是我明明是用的tab键,为什么变成了空格呢,在vscode里面这样设置一下就好了
如果使用vscode,点击右下角 制表符长度,选择tab缩进,选择4就可以了
相关文章
- 04-01问题:IndentationError: unindent does not match any outer indentation level
- 04-01“IndentationError: unindent does not match any outer indentation level“【已解决】
- 04-01unindent does not match any outer indentation level错误处理办法
- 04-01Unindent does not match any outer indentation level报错
- 04-01[Python] 错误“IndentationError: unindent does not match any outer indentation level”是什么意思?
- 04-01【已解决】Python脚本运行出现语法错误:IndentationError: unindent does not match any outer indentation level
- 04-01python报错 IndentationError: unindent does not match any outer indentation level
- 04-01[已解决]IndentationError: unindent does not match any outer indentation level
- 04-01Python成功解决IndentationError: unindent does not match any outer indentation level
- 04-01python中出现 IndentationError:unindent does not match any outer indentation level