title: how to sort a database
body: <p>I have a database that i now combined using this function</p>
  
  <pre><code>def ReadAndMerge():
      library1=input("Enter 1st filename to read and merge:")
      with open(library1, 'r') as library1names:
          library1contents = library1names.read()
      library2=input("Enter 2nd filename to read and merge:")
      with open(library2, 'r') as library2names:
          library2contents = library2names.read()
  
      print(library1contents)
      print(library2contents)
      combined_contents = library1contents + library2contents  # concatenate text
  
      print(combined_contents)
      return(combined_contents)
  </code></pre>
  
  <p>The two databases originally looked like this</p>
  
  <pre><code>Bud Abbott 51 92.3
  Mary Boyd 52 91.4
  Hillary Clinton 50 82.1
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>Don Adams 51 90.4
  Jill Carney 53 76.3
  Randy Newman 50 41.2
  </code></pre>
  
  <p>After being combined they now look like this</p>
  
  <pre><code>Bud Abbott 51 92.3
  Mary Boyd 52 91.4
  Hillary Clinton 50 82.1
  Don Adams 51 90.4
  Jill Carney 53 76.3
  Randy Newman 50 41.2
  </code></pre>
  
  <p>if i wanted to sort this database by last names how would i go about doing that?
  is there a sort function built in to python like lists? is this considered a list?
  or would i have to use another function that locates the last name then orders them alphabetically</p>