title: How can I create a pro-rated salary scale dictionary using a for loop?
body: <p>somewhat new to Python here and wondering what the best way to accomplish this task would be. I am trying to create a dictionary that represents a pro-rated salary scale for a certain amount of days.</p>
  <p>For example; day 1 salary = 1017781 and reduces by 5849 for each day after for a total of 174 days.</p>
  <p>So the dictionary's key:value pairs would be formatted as <code>{day: salary} </code></p>
  <p>The first three key:value pairs should look like:</p>
  <p><code>{1: 1017781, 2: 1011932, 3: 1006082}</code></p>
  <p>So far I've tried something like:</p>
  <pre><code>dicts = {}
  total_days = range(174)
  day = 1
  salary = 1017781
  
  for i in total_days:
      day += 1
      salary -= 5849
      dicts[day] = dicts[salary]
  </code></pre>
  <p>But I am getting <code>KeyError: 1011932</code></p>
  <p>Any solutions to creating this dictionary?</p>