[Tutor] Random module help

Alan Gauld alan.gauld at btinternet.com
Sat Oct 6 09:24:56 CEST 2007


"Norman Khine" <norman at khine.net> wrote

> >>> a = [q[x] for x in q_keys]
> >>> a
> ['1q', '4q', '5q', '7q', '8q']
> >>> a
> ['1q', '4q', '5q', '7q', '8q']
>
>
> This only returns the same questions, what am I doing wrong? How do 
> I
> return a different set?

I don't understand your problem.
You are printing 'a' twice but not doing anything between times.
So of course it prints the same thing. I'd be worried if it didn't!

Can you demonstrate what you think is wrong?

Alan G. 




More information about the Tutor mailing list