Re: [Tutor] random.choice function

2008-01-19 Thread Remco Gerlich
Hi, This line: ch = "So good to see you!","How are you?","Everything good today?","Glad you're here!".split(" ") Creates a tuple with 4 elements: 1. "So good to see you!" 2. "How are you?" 3. "Everything good today?" and 4. "Glad you're here!".split(" "), which is equal to ["Glad","you're", "he

Re: [Tutor] random.choice function

2008-01-19 Thread Alan Gauld
"Cecilia Grahn" <[EMAIL PROTECTED]> wrote > I am trying to make a script which returns a random string: > > ch = "So good to see you!","How are you?","Everything good > today?","Glad you're here!".split(" ") To python this line has 4 expressions which Pyhon will assign as a tuple to ch. The firs

[Tutor] random.choice function

2008-01-19 Thread Cecilia Grahn
Hi, this is my first mail and I apologize if I got something wrong =) I am trying to make a script which returns a random string: #hello.py # Get the user's name and print a friendly hello import random, string name = raw_input("Your name please:") ch = "So good to see you!","How are you?","Everyt