>>> l = list() >>> l Out[1]: [] >>> l = [1] >>> l Out[1]: [1] # cannot add a number to a list >>> l += 1 Traceback (most recent call last): File "/Users/guestuser/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2721, in run_code exec code_obj in self.user_global_ns, self.user_ns File "", line 1, in l += 1 TypeError: 'int' object is not iterable # must add compatible types >>> l += [1] >>> l Out[1]: [1, 1] >>> l += (1) >>> l Out[1]: [1, 1, 1] # can append a number >>> l.append(1) >>> l Out[1]: [1, 1, 1, 1] # appending a list does something different >>> l.append([1]) >>> l Out[1]: [1, 1, 1, 1, [1]] # must add a list of lists to get the same result >>> l += [[1]] >>> l Out[1]: [1, 1, 1, 1, [1], [1]]