def shopping_total(n, items): #print("f", n, items) tot = 0.0 disc = lambda price: price * 0.9 if price > 50 else price for a, price in items: tot = tot + disc(price) return round(tot, 1)