Selecting random elements from a list.

Benjamin Kaplan benjamin.kaplan at case.edu
Mon Oct 13 23:43:13 CEST 2008


On Mon, Oct 13, 2008 at 5:29 PM, aditya shukla
<adityashukla1983 at gmail.com>wrote:

> Hello folks,
>
> i have a list say list1=[a,b,c,...z] ie 26 elements i have to take 5
> elements from it randomly and save in another list.Please explain how to do
> this?
>
>
> Aditya
>


http://docs.python.org/library/random.html#module-random



>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081013/f2ddccbb/attachment.html>


More information about the Python-list mailing list