title: Python: create dict from list and auto-gen/increment the keys (list is the actual key values)?
body: <p>i've searched pretty hard and cant find a question that exactly pertains to what i want to..</p>
  
  <p>I have a file called "words" that has about 1000 lines of random A-Z sorted words...</p>
  
  <pre><code>10th
  1st
  2nd
  3rd
  4th
  5th
  6th
  7th
  8th
  9th
  a
  AAA
  AAAS
  Aarhus
  Aaron
  AAU
  ABA
  Ababa
  aback
  abacus
  abalone
  abandon
  abase
  abash
  abate
  abater
  abbas
  abbe
  abbey
  abbot
  Abbott
  abbreviate
  abc
  abdicate
  abdomen
  abdominal
  abduct
  Abe
  abed
  Abel
  Abelian
  </code></pre>
  
  <p>I am trying to load this file into a dictionary, where using the word are the key values and the keys are actually auto-gen/auto-incremented for each word </p>
  
  <p>e.g {0:10th, 1:1st, 2:2nd} ...etc..etc...</p>
  
  <p>below is the code i've hobbled together so far, it seems to <em>sort of</em> works but its only showing me the last entry in the file as the only dict pair element</p>
  
  <pre><code>f3data = open('words')
  
  mydict = {}
  
  for line in f3data:
      print line.strip()
      cmyline = line.split()
      key = +1
      mydict [key] = cmyline
  
  print mydict
  </code></pre>