Use a dictionary: >>> data = [('Visa', 980.5), ('Rogers', 61.5), ('Visa', 215.0)] >>> result = {} >>> for card, value in data: total ...
確定! 回上一頁