seed = [1,2,3]
seed.append(4)
print seed  # [1,2,3,4]

many of the list methods are in place methods on a mutable object. In
other words, doing the following results in None.

seed = [1,2,3]
seed = seed.append(4)
print seed  # None

you also just wiped out your list... The append method like many other
list methods simply return None. To get the value of an append, append
first then access later like so.

seed = [1,2,3]
seed.append(4)
print seed  # [1,2,3,4]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to