How can I print the entire converted sentence on a single line?
<p>I am trying to expand on Codeacademy's Pig Latin converter to practice basic programming concepts. </p>

<p>I believe I have the logic nearly right (I'm sure it's not as concise as it could be!) and now I am trying to output the converted Pig Latin sentence entered by the user on a single line.</p>

<p>If I print from inside the for loop it prints on new lines each time. If I print from outside it only prints the first word as it is not iterating through all the words. </p>

<p>Could you please advise where I am going wrong?</p>

<p>Many, many thanks for your help.</p>

<pre><code>pyg = 'ay'

print ("Welcome to Matt's Pig Latin Converter!")

def convert(original):
    while True:
        if len(original) &gt; 0 and (original.isalpha() or " " in original):
            print "You entered \"%s\"." % original
            split_list = original.split()

            for word in split_list:
                first = word[0]
                new_sentence = word[1:] + first + pyg
                final_sentence = "".join(new_sentence)
                print final_sentence


            break

        else:
            print ("That's not a valid input. Please try again.")
            return convert(raw_input("Please enter a word: "))

convert(raw_input("Please enter a word: "))
</code></pre>

<p>Try:</p>

<pre><code>pyg = 'ay'

print ("Welcome to Matt's Pig Latin Converter!")

def convert(original):
    while True:
        if len(original) &gt; 0 and (original.isalpha() or " " in original):
            final_sentence = ""
            print "You entered \"%s\"." % original
            split_list = original.split()
            for word in split_list:
            first = word[0]
            new_sentence = word[1:] + first + pyg
            final_sentence = final_sentence.append(new_sentence)
            print final_sentence



            break

        else:
            print ("That's not a valid input. Please try again.")
            return convert(raw_input("Please enter a word: "))

convert(raw_input("Please enter a word: "))
</code></pre>

<p>It's because you are remaking final_sentence every time in the for loop instead of adding to it.</p>

python join printing