title: sort() and list has not attribute
body: <p>I trying to get into programming and have a simple question:</p>
  
  <p>If I have</p>
  
  <pre><code>def break_words(stuff):
      words = stuff.split(' ')
      return words
  
  def sort_words(words):
      ##Sorts the words."""
      words = break_words(words)
      return sorted(words)
  
  def print_first_word(sentence):
      words = break_words(sentence)
      words = sorted(words)
      return words.pop(0)
  
  
  sentence = "Tequila Mariachi Sangria"
  print break_words(sentence)
  print sort_words(sentence)
  print print_first_word(sentence)
  </code></pre>
  
  <p>When I run it, my code is fine, while if I write</p>
  
  <pre><code>####################Test################
  
  def break_words(stuff):
      words = stuff.split(' ')
      return words
  
  def sort_words(words):
      ##Sorts the words."""
      words = break_words(words)
      return sorted(words)
  
  def print_first_word(sentence):
      words = break_words(sentence)
      words = sort_words(words)
      return words.pop(0)
  
  
  sentence = "Tequila Mariachi Sangria"
  print break_words(sentence)
  print sort_words(sentence)
  print print_first_word(sentence)
  </code></pre>
  
  <p>I will get </p>
  
  <pre><code>AttributeError: "list" object has no attribute "split"
  </code></pre>
  
  <p>both functions break_words and sort_words create list objects, so why do I get the error in my second case?</p>