title: Ordering a leaderboard in repl.it
body: <p>Need to order a leaderboard that I have created in a program in repl.it. </p>
  
  <p>When ordering, it currently seems to order each entry based on its first digit, so all single digit entries are ordered correctly, but all double digit numbers are sorted by the first digit only, so for example it orders 11 below 2 as it reads it as 1. </p>
  
  <p>Any ideas?</p>
  
  <p>NB. leaderboard stores names and scores and scores are definitely stored as a string so I need to change that to integers from your advice so far. Thank you. Have tried to change in second line down - file.write(str(score)) - but tells me must be a string not int. help? Code for this section below.</p>
  
  <pre><code>file = open ("Leaderboard.txt", "a")
  file.write(str(score))
  file.write(",")
  file.write(nickname)
  file.write("\n")
  file.close()
  
  Leaderboard1 = list()
  Leaderboard_unsorted = "Leaderboard.txt"
  with open (Leaderboard_unsorted) as fin:
    for line in fin:
      if line[0] != "0":
        Leaderboard1.append(line.strip())
  Leaderboard1.sort(reverse = True)
  </code></pre>