Give a method that sums all the numbers in a list. The method should be able to skip elements that are not numbers. So, sum([1, 2, 3]) should be
list
sum([1, 2, 3])
use filter and isinstance like this
>>> test = [1,2,3,4,5,6,"A","B"] >>> sum(filter(lambda x:isinstance(x,int),test)) 21 >>>