Python程序调试-TabError: inconsistent use of tabs and spaces in indentation

报错信息:TabError: inconsistent use of tabs and spaces in indentation


说明:代码缩进统一使用Tab键或空格键,不能混用。


解决办法:


1、对出错行的代码,由Tab键缩进改为空格缩进,以4个空格为一个缩进单位。


2、对出错行的代码,由空格键缩进改为Tab键缩进。