You can do a lot with arrays
For my memory (because my little fish brain may fail me):
nephews = [ “Jesse”, “Leon”, “Neville”]
You would print Leon’s name by: nephews[1]
You can get total number of nephews by: len(nephews)
You could give them all a surname by:
nephews [i] = nephews [i] + ‘Kitungulu’
You could add a 4th nephew by:
nephews.append (’Johnie Bravo’)
nephews.extend (’Johnie Bravo’)
extended_nephews = nephews + [’Johnie Bravo’]
nephews.insert (3, ‘Johnie Bravo’)
You can delete a nephew by:
You can arrange the names in alphabetical order by:
This is a numerical array:
squares = [0,1,4,9,16,25,36,49]
You can slice the array so that you get the first and second elements by:
squares[:4] to get 0,1,4, 9
squares[1:] to get 1,4,9,16,25,36,49
squares[:] to get 0,1,4,9,25,36,49
squares[2:4] = ‘56, 2′ //You can re-assign elements