python常见错误(1)TabError: inconsistent use of tabs and spaces in indentation

问题:Python文件运行时报TabError: inconsistent use of tabs and spaces in indentation

原因:说明Python文件中混有Tab和Space用作格式缩进。这通常是使用外部编辑器编辑Python文件时,自动采用Tab进行格式缩进。

解决:将Tab转换成4个Space(通常)或者用Python编辑器(如pyDev)格式化。

原文地址:https://www.cnblogs.com/Ph-one/p/12200249.html