Python question: how do I add an item into a cart from a dictionary I created when asking the user for their input? I know for lists if the item the user is asking for is in the list say then it wil...


Python question: how do I add an item into a cart from a dictionary I created when asking the user for their input? I know for lists if the item the user is asking for is in the list say then it wil be added into said cart, but how would it work for dictionaries?


lists_books = [Journey to the west, Samurai showdown, Guitar methods]


user_lists = []


while lists_books > 1


if user_lists == lists_books


cart.update


return cart.items


.


(sorry for the horrible list example code) How would it work for dictionaries to add an item to a cart?




Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here