I have the original list with dictionaries inside it for 3 drinks and their corresponding prices and stock levels.
products = [
{
"name": "coke",
"price": 3,
"stock": 10
},
{
"name": "bepis",
"price": 2,
"stock": 232
},
{
"name": "fanta",
"price": 2,
"stock": 144
}
[
If I had 3 lists such as these:
["mdew", "water", "tea", "tapwater"] # names
["3", "10", "3", "40"] # prices
["10", "10", "10"] # stock levels, tap water is out of stock so there are only 3 values here
As seen above there are 3 new lists but now there are 4 total drinks. The lists correspond to each other e.g mdew - 3 - 10, water 10 - 10, tea - 3 - 10, tapwater - 40 - EMPTY.
How could I go about recreating the first list, replacing the values with the 3 lists? Sorry if this was poorly worded.
Thank you!