python bug(一)——python TabError: Inconsistent use of tabs and spaces in indentation

自己敲的程序会出现下面的bug:缩进中不一致地使用制表符和空格

错误原因,在所写的函数中用了空格,python应该要用tab来进行缩进的。
这个错误是说你用了tab键作缩进了,
因为在Python不像C/C++里用大括号来区分程序块,而是用缩进
所以缩进很重要你把空格都换成Tab就好了  

转自:https://blog.csdn.net/robinson_911/article/details/73077761

猜你喜欢

转载自blog.csdn.net/qq_37764129/article/details/85265942