Codewars note:Number of People in the Bus

My Codewars

Solition:

def number(bus_stops):
    return sum([i[0] - i[1] for i in bus_stops])

 

def number(bus_stops):
    return sum(on - off for on, off in bus_stops)

 

posted @ 2022-07-06 19:08  大序列  阅读(31)  评论(0)    收藏  举报