RE: append method

Jaap Vermeulen (jaap@sequent.com)
Mon, 07 Mar 94 14:55:00 PST

| >>> list=[100,fib(100),200,fib(200)]
| >>> list
| [100, [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89], 200, [1, 1, 2, 3, 5, 8, 13,
21,
| 34, 55, 89, 144]]
| >>> list.append(300,fib(300))

You're appending a tuple (hence the parenthesis). You can append only one
element at a time. So you can either write:

list.append(300)
list.append(fib(300))

Or you just add a list to the list:

list = list + [300,fib(300)]

-Jaap-