title: Python: Generating YYMM string between two dates
body: <p>I am given start_year, end_year, start_month and end_month e.g.</p>
  
  <pre><code>start_year = 2005
  end_year   = 2017
  start_month = 3
  end_month   = 2
  </code></pre>
  
  <p>I want to generate the following strings:
  0503.mat, 0504.mat, 0505.mat, 0506.mat, 0507.mat, 0508.mat, 0509.mat, 0510.mat, 0511.mat, 0512.mat, 0601.mat, ..0612.mat,....., ...1701.mat, 1702.mat</p>
  
  <p>i.e. combine the year and month and generate such combination for all months between given start year/month and end year/month</p>
  
  <p>Edit:</p>
  
  <p>.mat is repeating on all output</p>
  
  <p>This is what I have tried so far:</p>
  
  <pre><code>k = 0
  for yr in range( 2005, 2007 + 1 ):
      for mn in range( 1, 12 + 1 ):
          YYMM[k]    =   "{:02}{:02}.mat".format(yr % 100, mn) )
          k = k + 1
  </code></pre>
  
  <p>But obviously it will not cover all months if I start at month 3 in year 2005 and go on to month 7 in 2006</p>