List and tuple

List:
a = [1, 3, 5, [9.0, 0]]   # list of 3 ints and a list
a[2] = 'some string'
a[3][0] = 0               # a is now [1,3,5,[0,0]]
b = a[0]                  # b refers first element in a
Tuple (``constant list''):
a = (1, 3, 5, [9.0, 0])   # tuple of 3 ints and a list
a[3] = 5                  # illegal! (tuples are const/final)
Traversing list/tuple:
for item in a:            # traverse list/tuple a
    # item becomes, 1, 3, 5, and [9.0,0]

previousnexttable of contents