title: When a draw occurs when tracking most occurrences in a list how to find element with highest index?
body: <pre><code>lines = ["Pizza", "Vanilla","Los Angeles Pikes","Cookie Washington Tennis Festival","Water Fiesta","Watermelon"]
  best= max(set(lines), key=lines.count)
  print (best)
  </code></pre>
  
  <p>The code above returns the greatest occurrence of an element in the list, but in case there is a draw, I want it to return the element with the greatest index. So here I want Watermelon to be printed and if anything is added without a break in the tie the highest index of the draw should be printed.</p>
  
  <p>I need a solution with simple basic code like that seen above and without the importing of libraries. If you could help find a good solution for this it would be really helpful.</p>