The 'int' object is unsubscriptable
<p>I have searched for nearly an hour online, but can't find anything. But I digress, line 6 keeps on returning <code>TypeError: 'int' object is unsubscriptable</code>. Please help me identify what causes this.</p>

<pre><code>def __reassigner__(allL, currentRow, currentSpace):
    changingRow=currentRow+1
    newl=[-1]*24
    while changingRow&lt;8:
        distance = changingRow-currentRow
        newl[8:15]=allL[changingRow[0:7]]  #Line 6, this one
        if newl[currentSpace]==-1:
           newl[currentSpace]= currentRow
         if newl[currentSpace-distance]==-1:
           newl[currentSpace-distance]= currentRow
        if newl[currentSpace+distance]==-1:
           newl[currentSpace+distance]= currentRow
        allL[changingRow[0:7]]=newl[8:15]
        changingRow+=1
    return(allL)
</code></pre>
