title: Sorting a text file alphabetically (Python)
body: <p>I would like to sort the file 'shopping.txt' in alphabetical order</p>
  
  <pre><code>shopping = open('shopping.txt')
  line=shopping.readline()
  while len(line)!=0:
      print(line, end ='')
      line=shopping.readline()
  #for eachline in myFile:
  #    print(eachline)
  shopping.close()
  </code></pre>