random from an array

Calvin79 del at mjclift.freeserve.co.uk
Sat Aug 7 00:20:37 CEST 2004

Hi All,

I've just started to try python so forgive the ignorance!

I've been using this, or something like it;

First = random.choice ('abc')
answer = first
print answer - no problems there.

What I want to do, however, is take a random pick from something like the

First = random.??? ("rna", "rnb", "rnc") - this of course "random.choice"
doesn't work.

Could some kind person help me out with the code? I know I'm trying to run
before I can walk, but there you go...



More information about the Python-list mailing list