title: give users the option to sort a list created from a txt document based on input
body: <p>This program will ask the user the class they want to view the results for and ask them how they want to sort them. the list is created from the lines in a text document.
  All that the program needs to do now is after the sort selection has been made to sort and then print in the way chosen.</p>
  
  <pre><code>print ("Please enter the class number below.")
  print ("After that please select how you would like to sort them")
  
  classnumber = input("Which results do you want to view? (enter class number)")
  
  if classnumber == ('1'):
          li = [i.strip().split() for i in open("class1.txt").readlines()]
  if classnumber == ('2'):
          li = [i.strip().split() for i in open("class1.txt").readlines()]
  if classnumber == ('3'):
          li = [i.strip().split() for i in open("class1.txt").readlines()]
  
  print ("Press a For Alphabetically")
  print ("Press h For Highest To Lowest")
  print ("Press m For Mean (Average Highest To Lowest)")
  
  sort = input ("How would you like to sort the results?")
  
  if sort == 'a':
          sorted("class1.txt")
          print([i.strip().split() for i in ("class1.txt").readlines()])
  if sort == 'h':
          sorted(reverse=True)
          print([i.strip().split() for i in ("class.2txt").readlines()])
  if sort == 'm':
          averages=[]
          sorted(reverse=True)
          print([i.strip().split() for i in ("class3.txt").readlines()])
  </code></pre>
  
  <p>How would I get the if statements to sort how the user selects and then print the list in the right order?</p>