打印奇数代码如下:
python错误提示“TabError: inconsistent use of tabs and spaces in indentation”
观察了很久但是却找不出问题。后来在网上找到了答案。是空格和制表符混合的问题。

在notepad++中显示制表符的步骤如下:
python错误提示“TabError: inconsistent use of tabs and spaces in indentation”
显示后代码格式如下:
python错误提示“TabError: inconsistent use of tabs and spaces in indentation”
将空格变为制表符后(如下)可以成功运行
python错误提示“TabError: inconsistent use of tabs and spaces in indentation”

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2021-09-06
  • 2021-10-02
  • 2021-06-13
  • 2021-06-15
  • 2021-08-17
猜你喜欢
  • 2021-06-04
  • 2022-01-13
  • 2021-09-12
  • 2021-11-22
  • 2021-07-12
相关资源
相似解决方案