title: Position in Python Lists
body: <p>I am trying to write a code for operation between each element with all the other elements of a list but not with itself. Below is the code.</p>
  
  <pre><code>list = [10,20,30,30,40,50,50,50,60,70];
  for i in list:
          sum=i;
          for j in list:
                  if list.index(i) != list.index(j):
                         s=(50-((j-i)/2))*0.13;
                         sum+=s;  
          print("score of %d is %f"%(i,sum));
  </code></pre>
  
  <p>But still the code is not working. It is not satisfying the <code>if</code> condition of positions. </p>