1. 程式人生 > 其它 >python中關於TabError: inconsistent use of tabs and spaces in indentation報錯解決方法!

python中關於TabError: inconsistent use of tabs and spaces in indentation報錯解決方法!

技術標籤:python基礎解析報錯python

錯誤原理
這類的報錯經常出現在你去複製貼上其他文章時候出現的空格和tab鍵混合使用的情況。

解決方法:
這時候你需要把第一個出錯行開始把前面的空格刪除,tab到原始位置即可。

錯誤提示內容:

TabError: inconsistent use of tabs and spaces in indentation

在這裡插入圖片描述
每天進步一點點。