-3
我有以下的功能,我收到Indentation Error
每当我尝试运行它:缩进错误While循环在Python
def fib(n):
# write Fibonacci series up to n
"""Print a Fibonacci series up to n."""
a, b = 0, 1
while a < n:
print a
a, b = b, a+b
# Now call the function we just defined:
fib(2000)
错误消息:
print a
^
IndentationError: expected an indented block
如何解决的IndentationError Python中的错误?
欢迎使用python编程,其中缩进螺丝你。基本上你需要确保你使用一个标签或空间,而不是两个。 – btevfik 2013-05-04 08:23:36
为什么这个问题有这么多downvotes? – bakalolo 2016-03-23 21:24:09