📜  如何在python代码示例中做列表的总和

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

代码示例2
def calculate_cards(cards):
    total= 0
    for card in cards:
        total = total + card
    return total
print(calculate_cards([11,7,5]))