Is there a way in python to perform randomization between two lists within a list and have a dictionary returned?
For example, from:
[[1,2,3,4], ['a','b','c','d']]
to:
[{3:'a'}, {1:'d'}, {2:'c'}, {4:'b'}]
What's the best way to achieve this? Using a list comprehension? My two lists are actually very large, so I'm wondering whether there's a more efficient alternative.
{1: 'd', 2: 'a', 3: 'c', 4: 'b'}?