I am getting an error saying "UnboundLocalError: local variable 'numberOfTripsCompleted' referenced before assignment"
trips= 0
def increasetrips(x):
trips += 1
so I construct a list: ['driver', firstname, lastname,vehicletype, trips]. After instantiating this with an example: ['driver', Bob, Brown, truck, 0], I now want to have a function to increase the 'trips' part of the list by 1 each time. The function I have above does not give an error, but it after running ' increasetrips', when I call back for my instantiated list, position 4 still holds '0'. So it keeps returning ['driver', Bob, Brown, truck, 0], when i am expecting ['driver', Bob, Brown, truck, 1]