append a value to a list in python code example
Example 1: how do i add to a list in python
a=[1,2,3,4]
a+=[5,6]
Example 2: append to lists python
list = [1, 2, 3]
print list.append(4) ## NO, does not work, append() returns None
## Correct pattern:
list.append(4)
print list ## [1, 2, 3, 4]