【发布时间】:2013-08-16 01:12:19
【问题描述】:
给定以下解释器会话:
>>> def func(depth,width):
... if (depth!=0):
... for i in range(width):
... print(depth,i)
... func(depth-1,width)
File "<stdin>", line 5
func(depth-1,width)
^
TabError: inconsistent use of tabs and spaces in indentation
谁能告诉我代码中的TabError 是什么?
【问题讨论】:
-
您在代码中混合了制表符和空格,不要那样做。只使用空格。
标签: python python-3.x