On 2011/11/28 11:37 AM, Peter Otten wrote:
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 ;)


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Doh, that's what you get when you retype your code instead of copy/pasta it, it was originally raw_input.
--

Christian Witts
Python Developer
//
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to