I have a dictionary in python with date tuples as keys and data tuples as the values.
An example might be:
(1900, 1): (2.0, 3.0, 4.0)
where 1900 is the year 1900 and 1 is the first month, January.
The key tuples follow like so: (1900, 2), (1900, 3) and so on.
How can I iterate over a dictionary like this? Specifically the first month of every year, so the key set would look like (1900, 1)…(1910, 1) with the first item in the tuple incrementing, but the second staying the same.
Thank you for any help you can give me, since I am relatively new to python.
1 Answer