title: Datetime formatter of python works for one string and does not for another
body: <p>I have a dictionary whose keys needs to be converted to a datetime object and format it to an understandable format. This is the dictionary</p>
  <pre><code>blah =  {
              &quot;COLUMNNAME&quot;: &quot;Some thing&quot;,
              &quot;RID&quot;: 6,
              &quot;Y202009&quot;: 15791.68,
              &quot;Y202006&quot;: 8149.99,
              &quot;Y202003&quot;: 27252.75,
              &quot;Y201912&quot;: 19885.85,
              &quot;Y201909&quot;: 18748.21,
              &quot;rowno&quot;: 5.0
          } 
  
  </code></pre>
  <p>And this is the function to convert the keys into desired format</p>
  <pre><code>def dict_process(idict):
      del idict[&quot;RID&quot;]
      del idict['rowno']
      for key, val in idict.items():
          try:
              new_key = str(datetime.strptime(key,&quot;Y%Y%m&quot;).strftime(&quot;%Y %b&quot;))
              idict[new_key] = idict.pop(key)
          except:
              None
      return None
  </code></pre>
  <p>But this function returns a dictionary which is like this</p>
  <pre><code>{'COLUMNNAME': 'Net Sales',
   'Y201912': 19885.85,
   'Y201909': 18748.21,
   '2020 Sep': 15791.68,
   '2020 Jun': 8149.99,
   '2020 Mar': 27252.75}
  </code></pre>
  <p>Could anyone help me with why the formatter is not working for years that contain 2019?</p>