Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python sum only numbers

def SumNum(mylist):
    the_sum = sum(filter(lambda i: isinstance(i, (int, long, float)), mylist))
    return the_sum
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #sum #numbers
ADD COMMENT
Topic
Name
2+3 =