title: Python: How do you sort the contents of a .txt file in numerical order?
body: <p>I have some trouble making a code that arranges a .txt file in numerical order.</p>
  <p>The problem I'm having is when ordering numbers 77, 45, 85, 100 in the .txt file it orders it as 100, 45, 77, 85; 100 being the lowest.</p>
  <p>Not sure how I would correct that as I want 100 to be the highest.</p>
  <p>This is what I have so far:</p>
  <pre><code>import csv
  import operator
  
  
  sample = open(&quot;score.txt&quot;)
  csv1 = csv.reader(sample, delimiter=',')
  sort = sorted(csv1, key=operator.itemgetter(1))
  for eachline in sort:
      print eachline
  </code></pre>