代码问题提问
class Fib(object):
def __init__(self, num):
self.num = num
a=0,b=1,self.numbers = [],c=0
i = 0
while i < self.num:
self.numbers.append(a)
c=a,a=b,b=a+c
i=i+1
def __str__(self):
return str(self.numbers)
def __len__(self):
return len(self.numbers)
f = Fib(10)
print f
print len(f)
请问这段代码错误在哪里了?