我有以下功能,Indentation Error
每当我尝试运行它时都会收到一个:
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
如何解决 python 中的 IndentationError 错误?