/* */

Tuesday, 22 March 2011

Append

lst = [1,2,3,]
lst.append(4)
lst
[1,2,3,4]

Simply adds the value in the brackets to the variable (note the variable was declared 'lst' and not 'list'. 'list' is a function and would have given an error).

No comments:

Post a Comment