title: How to fix the index of duplicate in a list
body: <p>I want to make a list that can store up the index of list a according to decreasing value</p>
  <p>this is my code:</p>
  <pre><code>a = [1,2,2,6,7]
  b = deepcopy(a)
  b.sort(reverse = True)
  position = []
  
  for counter in range(len(a)):
     position_highest = b[counter]
     position_fit = a.index(position_highest)
     position.append(position_fit)
  
  print(position)
  </code></pre>
  <p>The code gave me a result like this
  [4,3,1,1,0]</p>
  <p>can I know how to handle the duplicate so that I can get a result in a list like this
  [4,3,1,2,0]</p>