def fibs(n):
'''This is a Fibonacci sequence.'''
result=[0,1]
for i in range(0,n-2):
result.append(result[-1]+result[-2])
return result
end = fibs(10)
print(end)
print(fibs.__doc__)
def fibs(n):
'''This is a Fibonacci sequence.'''
result=[0,1]
for i in range(0,n-2):
result.append(result[-1]+result[-2])
return result
end = fibs(10)
print(end)
print(fibs.__doc__)
本文标题:python函数文档
本文链接:https://www.haomeiwen.com/subject/bhjnuxtx.html
网友评论