This is too complicated for me, so I'm asking for help. I have dict with like this:
dict = {'date_from': u'2019-04-01',
'date_to': u'2019-04-30'}
and from this dict, I need to make a list like this:
list = ['2019-04']
since the month is the same.
If dict is like this
dict = {'date_from': u'2019-04-01',
'date_to': u'2019-05-30'}
the list should be like:
list = ['2019-04', '2019-05']
and so on.
Another Example
dict = {'date_from': u'2019-01-01',
'date_to': u'2019-05-30'}
list = ['2019-01', '2019-02','2019-03','2019-04','2019-05']
I know that this is possible, but can't figure out how to make it work.