code: def update(self):
          
  
          subtotal = float(0)
          total = float(0)
          for product in self.items:
              subtotal += float(product["price"])
          if subtotal > 0:
              total = subtotal + self.extra_amount
          self.subtotal = subtotal
          self.total = total
docs: Remove items in cart