create dictionary from list comprehension code example
Example 1: create dictionary comprehension python
{key:value for key in iterable}
Example 2: dict comprehension python
keys=['var1','var2','var3']
my_dict={key:np.zeros(10) for key in keys}
{key:value for key in iterable}
keys=['var1','var2','var3']
my_dict={key:np.zeros(10) for key in keys}