title: Swaping two elements in a list shows unexpected behaviour
body: <p>I have a list:</p>
  
  <pre><code>lis = [12,45,15,67,89]
  </code></pre>
  
  <p>I want to swap 12 and 89 such that the list should look</p>
  
  <pre><code>lis = [89,45,15,67,12]
  </code></pre>
  
  <p>When I do it this way</p>
  
  <pre><code>lis[0], lis[lis.index(89)] = lis[lis.index(89)], lis[0]
  </code></pre>
  
  <p>Nothing is changed</p>
  
  <pre><code>lis = [12,45,15,67,89]
  </code></pre>
  
  <p>But when I do it this way</p>
  
  <pre><code>lis5[0], lis5[4] = lis5[4], lis5[0]
  </code></pre>
  
  <p>It works perfect</p>
  
  <pre><code>lis = [89,45,15,67,12]
  </code></pre>
  
  <p>So why it isn't working the first way? PS-The whole reason I want to do the first way is because I want to find the max element in a list and then swap it with the first element of the list.</p>
  
  <p>Something like:</p>
  
  <pre><code>max1 = max(lis)
  lis[0], lis[lis.index(max1)] = lis[lis.index(max1)], lis[0]
  </code></pre>