title: adding an incremental counter to loop in a python parsing script
body: <p>At the moment I'm using the following python script:</p>
  
  <pre><code>import json
  from collections import defaultdict
  from pprint import pprint
  
  with open('prettyPrint.txt') as data_file:
      data = json.load(data_file)
  
  locations = defaultdict(list)
  
  
  for item in data['data']:
      location = item['relationships']['location']['data']['id']
      locations[location].append(item['id'])
  
  pprint(locations)
  </code></pre>
  
  <p>to parse some dirty json data like so: </p>
  
  <pre><code>{
      "links": {
          "self": "http://localhost:2510/api/v2/jobs?skills=data%20science"
      },
      "data": [
          {
              "id": 121,
              "type": "job",
              "attributes": {
                  "title": "Data Scientist",
                  "date": "2014-01-22T15:25:00.000Z",
                  "description": "Data scientists are in increasingly high demand amongst tech companies in London. Generally a combination of business acumen and technical skills are sought. Big data experience ..."
              },
              "relationships": {
                  "location": {
                      "links": {
                          "self": "http://localhost:2510/api/v2/jobs/121/location"
                      },
                      "data": {
                          "type": "location",
                          "id": 3
                      }
                  },
                  "country": {
                      "links": {
                          "self": "http://localhost:2510/api/v2/jobs/121/country"
                      },
                      "data": {
                          "type": "country",
                          "id": 1
                      }
                  },
  </code></pre>
  
  <p>At this point the output is in this way: </p>
  
  <pre><code>         85: [36026,
                36028,
                36032,
                36027,
                217897,
                286398,
                315064,
                320879,
                322303,
                322608,
                322611,
                323199,
                325659,
                327652],
           88: [13690,
                13693,
                13689,
                13692,
                13691,
                16454,
                16453,
                28002,
                28003,
                28004,
                28001,
                114667,
                233319,
                233329,
                263814,
                271490,
                271571,
                271569,
                271570,
                291274,
                291275,
                300376,
                300373,
                301293,
                301295,
                304286,
                304285,
                320425,
                320426,
                320424,
                320431,
                320430,
                321284,
                321281,
                321283,
                321282,
                321280,
                324345,
                327926,
                347985,
                358537,
                358549,
                357807,
                364541,
                358431,
                334990,
                359241],
  </code></pre>
  
  <p>But I'd like to change it so that the output looks like this: </p>
  
  <pre><code>         ...
           87: 02
           88: 73
           89: 15
           90: 104
           ...
  </code></pre>
  
  <p>I know I need to put some kind of <code>i=0</code>, <code>i++</code> into that loop somewhere- but I can't figure it out- how to do that? </p>