[Tutor] Random order program
Peter Otten
__peter__ at web.de
Mon Nov 28 10:37:17 CET 2011
Christian Witts wrote:
> Is there anything wrong with just doing the following ?
>
> from random import shuffle
> # just type words with space separating the items
> # ie. one two three four five
> words = input('Please enter a list of words: ')
> word_list = words.split()
> print word_list
> shuffle(word_list)
> print word_list
You're mixing 3.x input and 2.x print ;)
More information about the Tutor
mailing list