Pick random element from list
- To: mathgroup at smc.vnet.net
- Subject: [mg43276] Pick random element from list
- From: "Khufu" <a7tv-pbcm at spamex.com>
- Date: Sat, 23 Aug 2003 08:09:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Mathgroup, Is there a built-in function to pick a random element from a list? I'm looking for something simple, like: list = {1,2,3,a,b,c} PickRandom[list] returns "b", etc. If this isn't built-in, can anyone suggest a simple/efficient implementation? Many thanks, -K
- Follow-Ups:
- Re: Pick random element from list
- From: Dr Bob <drbob@bigfoot.com>
- Re: Pick random element from list