这段代码怎么理解
def __init__(self, num):
self.num = num
number = []
def fib(num):
if(num != 1 and num != 2):
result = fib(num - 1) + fib(num - 2)
return result
elif(num == 1):
return 0
elif(num == 2):
return 1
其中的
if(num != 1 and num != 2):
result = fib(num - 1) + fib(num - 2)
return result
若num是10 则result=fib(9)+fib(8)怎么理解?