title: Pig latin string conversion in python
body: <p>I'm trying to create a function that turns text into pig Latin: simple text transformation that modifies each word moving the first character to the end and appending &quot;ay&quot; to the end. But all I get is an empty list. Any tips?</p>
  <pre><code>def pig_latin(text):
    say = &quot;&quot;
    words = text.split()
    for word in words:
      endString = str(word[1]).upper()+str(word[2:])
      them = endString, str(word[0:1]).lower(), 'ay'
      word = ''.join(them)
      return word
  
  print(pig_latin(&quot;hello how are you&quot;)) # Should be &quot;ellohay owhay reaay ouyay&quot;
  print(pig_latin(&quot;programming in python is fun&quot;)) # Should be &quot;rogrammingpay niay ythonpay siay unfay&quot;
  </code></pre>