Re: [Tutor] space between words printed

2013-11-03 Thread Alex Kleider
On 2013-11-02 20:18, Byron Ruffin wrote: The output generates a sentence made up of words chosen randomly from lists.  I am having trouble getting a space between each of the words.  Should I be thinking about .split?  Here is the code (ignore indent errors as it was copied and pasted) Thank you:

Re: [Tutor] space between words printed

2013-11-03 Thread Steven D'Aprano
On Sat, Nov 02, 2013 at 10:18:01PM -0500, Byron Ruffin wrote: > The output generates a sentence made up of words chosen randomly from > lists. I am having trouble getting a space between each of the words. > Should I be thinking about .split? Here is the code (ignore indent errors > as it was cop

Re: [Tutor] space between words printed

2013-11-03 Thread Alan Gauld
On 03/11/13 03:18, Byron Ruffin wrote: The output generates a sentence made up of words chosen randomly from lists. I am having trouble getting a space between each of the words. You probably want to look at the join() method of strings. It joins a list of strings together using a separator...

Re: [Tutor] space between words printed

2013-11-03 Thread Mark Lawrence
On 03/11/2013 03:18, Byron Ruffin wrote: The output generates a sentence made up of words chosen randomly from lists. I am having trouble getting a space between each of the words. Should I be thinking about .split? Here is the code (ignore indent errors as it was copied and pasted) Thank you:

[Tutor] space between words printed

2013-11-03 Thread Byron Ruffin
The output generates a sentence made up of words chosen randomly from lists. I am having trouble getting a space between each of the words. Should I be thinking about .split? Here is the code (ignore indent errors as it was copied and pasted) Thank you: import random def wordList(): adj1 =