2017-10-29 151 views

回答

1

你可以使用求和功能

def sum_of_marks(lst): 
    lst=['ali','P176133',45,32,90,87] 
    return sum(lst[2:]) 

print sum_of_marks(['ali','P176133',45,32,90,87])