title: Can I get 4 digit integer not string in python?
body: <p><a href="https://i.stack.imgur.com/1IOcV.png" rel="nofollow noreferrer">OUTPUT PHOTO</a></p>
  
  <pre><code>#### My work ####    
  from collections import OrderedDict
  import json
  
  test = {
      'c': 2,
      'B': '002',
      'A': '{0:04d}'.format(2)
      }
  
  
  data = {'Author': "joe", 'data': test}
  
  a = '{0:04d}'.format(2)
  b=[1, a, '{0:04d}'.format(2)]
  c = {1:a}
  
  print (a, b, '{0:04d}'.format(2))
  print(a)
  print(b)
  print(c)
  print('{0:04d}'.format(2))
  print json.dumps(data, indent=4, separators=(',', ': '))
  
  
  #### Output
  ('0002', [1, '0002', '0002'], '0002')
  0002
  [1, '0002', '0002']
  {1: '0002'}
  0002
  {
      "data": {
      "A": "0002",
      "c": 2,
      "B": "002"
  },
      "Author": "joe"
  }
  </code></pre>
  
  <p>I'd like to get 0002 not "0002"</p>
  
  <p>It is integer number when i use '{0:04d}'.format(2) in print().</p>
  
  <p>but It is printed out as string if I put it in list or dictionary.</p>
  
  <p>How can I get 4 digit number as integer type in dictionary?</p>
  
  <p>Thanks</p>