Trying to learn Python. I have a key in a dict where the value is a list. Is it possible to append a string to all items in the list?
value = {
"mything": ["pizza", "burger", "tacos"]
}
category = "food-"
print (value["mything"])
# prints ['pizza', 'burger', 'tacos']
What I want to achieve is this output:
print (value["mything"])
# prints ['food-pizza', 'food-burger', 'food-tacos']