Open this example in the interactive library
Source code
by_month = {month: [] for month in ('Jan', 'Feb')}
by_month['Jan'].append('Report')
print(by_month)Sample output
{'Jan': ['Report'], 'Feb': []}
Open this example in the interactive library
by_month = {month: [] for month in ('Jan', 'Feb')}
by_month['Jan'].append('Report')
print(by_month){'Jan': ['Report'], 'Feb': []}