Trying to create a batch of dictionaries:
January = {}
February = {}
March = {}
I would rather do something like:
January, February, March… = {}
which of course doesn’t work.
Ultimately, I’m wanting to create a dictionary of these dictionaries:
MONTHS_DICT = {'01':January,'02':February...}
Its not a ton of code to do it line by line but I’m just learning Python and…. doing something repetitive typically tells me it can be done more efficiently in some other way.
Thoughts?
p.s. I’m working with python 2.x but if using 3 for this example would be of some help, that’s not a problem.
Why do you want to month names as variables if you don’t use them? You could simply write