Note - this is a printout of Jeff's python session from running python and trying things out with lists and tuples. Python 3.7.3 (default, Apr 3 2019, 21:34:18) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> L = [] >>> len(L) 0 >>> L.append("hello")\ ... >>> L ['hello'] >>> L.append(3) >>> L ['hello', 3] >>> L[0] = L[1] >>> L [3, 3] >>> L[2] = 4 Traceback (most recent call last): File "", line 1, in IndexError: list assignment index out of range >>> L.append(4) >>> L [3, 3, 4] >>> L[-1] 4 >>> L[-2] 3 >>> L[-3] 3 >>> L[-4] Traceback (most recent call last): File "", line 1, in IndexError: list index out of range >>> del L[0] >>> L [3, 4] >>> "hello" in L False >>> "3" in L False >>> [3] in L False >>> L.append([3]) >>> L [3, 4, [3]] >>> L[2] [3] >>> [3] in L True >>> L[2] [3] >>> L[2].append("hello") >>> L [3, 4, [3, 'hello']] >>> len(L) 3 >>> T = (1, 2, 3) >>> T (1, 2, 3) >>> T[0] = 1 Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment >>> T.append(1) Traceback (most recent call last): File "", line 1, in AttributeError: 'tuple' object has no attribute 'append' >>> L.append(T) >>> L [3, 4, [3, 'hello'], (1, 2, 3)] >>> len(L) 4 >>> len(L[2]) 2 >>> len(L[3]) 3 >>> 3 in T True >>> "3" in T False >>> T in L True >>> [1, 2, 3] in L False >>> L in T False >>> L.remove(3) >>> L [4, [3, 'hello'], (1, 2, 3)] >>> L.append(3) >>> L.append(3) >>> L [4, [3, 'hello'], (1, 2, 3), 3, 3] >>> help(L.remove) >>> L.remove(3) >>> L [4, [3, 'hello'], (1, 2, 3), 3] >>> L.remove(3) >>> L.remove(5) Traceback (most recent call last): File "", line 1, in ValueError: list.remove(x): x not in list >>> T.remove(2) Traceback (most recent call last): File "", line 1, in AttributeError: 'tuple' object has no attribute 'remove' >>> L [4, [3, 'hello'], (1, 2, 3)] >>> L.index(4) 0 >>> L.index( (1,2,3) ) 2 >>> L.index(5) Traceback (most recent call last): File "", line 1, in ValueError: 5 is not in list