What is a simple way to convert some list like l = ['a', 'b', 'c'] into some dict of following form d = {'a': False, 'b': False, 'c': False}?
>Solution :
As enke suggested you can use fromkeys method of dict class to convert the list or any other iterable into a dict by a fixed value for all keys.
In [1]: a = [1,2, "hello"]
In [2]: dict.fromkeys(a, False)
Out[2]: {1: False, 2: False, 'hello': False}
And also you can use dict comprehension as below:
In [1]: a = [1,2, "hello"]
In [2]: {key: False for key in a}
Out[2]: {1: False, 2: False, 'hello': False}