'Python creating dictionaries in loop
Can anyone please help me in creating dictionary in loop.
I want my dictionary to be
Input
d={'a':'a1,a2,a3,.....,a10', 'b':'b1,b2,b3,....,b10'}
print(d)
{'a': 'a1,a2,a3,a4,a5,a6,a7,a8,a9,a10', 'b': 'b1,b2,b3,b4,b5,b6,b7,b8,b9,b10'}
Reason for asking this I have huge amount of dictionaries to make. Trying to make it a smart way
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
