I have a function that accepts four arguments, namely startmonth,
startyear, endmonth, and endyear.  For example:

startmonth = 8
startyear = 2009
endmonth = 1
endyear = 2010

What would be the most straightforward way to create a list of
year/month pairs from start to end?  I want to end up with a list of
tuples like this:

mylist = [(2009, 8), (2009, 9), (2009, 10), (2009, 11), (2009, 12), (2010, 1)]
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to