什么原因以及如何解决Python中这些奇怪的缩进错误? [重复]

问题描述 投票:0回答:1

是什么导致python中的这些缩进错误?当我遇到它们时,这让我发疯,直到周围消失为止。

enter image description here

python python-3.x whitespace indentation
1个回答
0
投票

Python编译器可能非常敏感,并且分别对待制表符和空格。您不能在某些行上使用制表符,而在其他行上使用空格,即使它们在外壳程序或编辑器中看起来相同。

© www.soinside.com 2019 - 2024. All rights reserved.