dictioanry comprehension python code example
Example 1: dictionary comprehension python
print({i:j for i,j in zip(txt_list,num) if i!="All"})
Example 2: dict comprehension
# Dictionary comprehension
{j:j*2 for i in range(10)}
print({i:j for i,j in zip(txt_list,num) if i!="All"})
# Dictionary comprehension
{j:j*2 for i in range(10)}