DEV Community

Discussion on: Daily Challenge #16 - Number of People on the Bus

Collapse
 
peter279k profile image
peter279k

Here is the simple solution with Python:

def number(bus_stops):
    people = 0
    for items in bus_stops:
        people += items[0]
        people -= items[1]

    return people