computed some Fibonacci numbers : Append « List « Python Tutorial






fibs = [0, 1] 
for i in range(8):
    fibs.append(fibs[-2] + fibs[-1]) 

print fibs








7.2.Append
7.2.1.The append method is used to append an object to the end of a list
7.2.2.Adding Elements to a List
7.2.3.computed some Fibonacci numbers
7.2.4.Uses a string as the sequence to create a list of characters in the string
7.2.5.Adding and Removing Items in a List