If I have 2 lists:
fruits = ["apple","apple","oranges","watermelon","apple"]
val = ["a","b","c","d","e"]
Each index of val corresponds to the index of fruits
So if I want a dictionary with:
dict
{
"apple" : ["a","b","e"],
"oranges": ["c"],
"watermelon": ["d"]
}
What is the simplest way to achieve this?