In the table below, save the ice cream name as a key value and the list as a dictionary value. The dictionary is named inventory.
Name price inventory
Melona 30020
Bibibig 4003
Jaws Bar 250 100
That's what I said
inventory={"Merona":(300,20), "Bibibig":(400,3), "Jawsbar":(250,100)}
inventory={"Merona":[300,20], "Bibibig":[400,3], "Jawsbar":[250,100]}
I want to know if it is right to express it with ()
or []
or it doesn't matter.
(Price, stock) It says to save the list as the value of the dictionary, right?
inventory={"Melona":[300,20], "Bibibig":[400,3], "Jawsbar":[250,100]}
© 2024 OneMinuteCode. All rights reserved.