在Python中出现“TabError: inconsistent use of tabs and spaces in indentation”的解决方案

  • 最近在linux上修改python oj代码的时候:

出现如下错误:

TabError: inconsistent use of tabs and spaces in indentation

这一般是由于混用了tab键4个空格键造成的,可以检查一下代码,要么全部使用tab,要么全部使用4个空格,或者用idle编辑器进行校正。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章