why is python my dictionary coming up a type error (ie srt) ? python 3 : <p>Hello currently I am learning how to program and I am currently learning python. However, I have been having issues with a program that is supposed to change dictionary values. when the program is run it comes up with this error:</p>

<pre><code> Traceback (most recent call last):
  File "d:\programs\ailens.py", line 15, in &lt;module&gt;
    ailen['color'] = 'green'
TypeError: 'str' object does not support item assignment
</code></pre>

<p>what did i do wrong with my code: </p>

<pre><code>ailens = {'color': 'green',
'spead':'slow'
,'points': 5 }

for ailen in ailens:
    if ailen == 'slow':
        ailen['color'] = 'yellow'
        ailen['spead'] = 'medium'
        ailen['points'] ='10'
    elif ailen == 'medium':
        ailen['color'] = 'red'
        ailen['spead'] = 'fast'
        ailen['ponits'] = '15'
    else:
        ailen['color'] = 'green'
        ailen['spead'] = 'slow'
        ailen['spead'] = 5                

print(ailen)
</code></pre>
