[Tutor] Random order program
Christian Witts
cwitts at compuscan.co.za
Mon Nov 28 10:41:11 CET 2011
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 at 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
//
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111128/8d9dc16f/attachment.html>
More information about the Tutor
mailing list