📜  python sum only numbers - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:03.741000             🧑  作者: Mango

代码示例2
def SumNum(mylist):
    the_sum = sum(filter(lambda i: isinstance(i, (int, long, float)), mylist))
    return the_sum