What's wrong with this code?
It should be
sum(cart)
We can't use
sum()
, since
cart
is not a list
There's nothing wrong with the code
It should be
sum(cart)
.