I have:
somelist = ['a', 'b', 'c', 'd']
I want it so that, the list would convert to a dict
somedict = {'a' : 1, 'b' : 1, 'c' : 1, 'd' : 1}
So I did:
somedict = dict(zip(somelist, [1 for i in somelist]))
it does work but not sure if it's the most efficient or pythonic way to do it
Any other ways to do it, preferably the simplest way?