Re: How to print random strings

2005-11-03 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: So how would I go about have 5 strings, and running a program that will randomly pick one of those to print? import random text = Perhaps reading the manual is a good idea?.split() random.choice(text) 'is' random.choice(text) 'reading' random.choice(text) 'a'

Re: How to print random strings

2005-11-03 Thread nak
[EMAIL PROTECTED] wrote: Im at the end of chapter 3 of Python Programming For The Absolute Beginner, Michael Dawson and he asks to make a fortune program that displays a fortune each time its ran, and to have 5 unique fortunes. Whats confusing is that, he never discussed how to do this. The

Re: How to print random strings

2005-11-02 Thread Jorge Godoy
[EMAIL PROTECTED] writes: Im at the end of chapter 3 of Python Programming For The Absolute Beginner, Michael Dawson and he asks to make a fortune program that displays a fortune each time its ran, and to have 5 unique fortunes. Whats confusing is that, he never discussed how to do this.

Re: How to print random strings

2005-11-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: Im at the end of chapter 3 of Python Programming For The Absolute Beginner, Michael Dawson and he asks to make a fortune program that displays a fortune each time its ran, and to have 5 unique fortunes. Whats confusing is that, he never discussed how to do this.