(item_name, price, quantity) tuples. Write compare_carts(cart_a, cart_b) that returns a string: "cart_a" if cart_a's total (sum of price*quantity across items) is strictly higher, "cart_b" if cart_b's is strictly higher, or "tie" if they are equal.cart_a = [('Pen', 10, 2)], cart_b = [('Book', 15, 1)]'cart_a'
cart_a total = 10*2 = 20; cart_b total = 15*1 = 15; 20 > 15 so cart_a wins.
cart_a = [('Pen', 10, 2)], cart_b = [('Book', 20, 1)]'tie'
Both totals equal 20.
Compute each cart's total with sum(price * qty for _, price, qty in cart).
Compare the two totals and return the matching label.