Mario Garcia <mario...@gmail.com> writes:
> Im trying to use sets for doing statistics from a data set.
> I want to select, 70% random records from a List. I thougth set where
> a good idea so I

No that's not a good idea.  When the set/dict documentation says you
get the keys in an undetermined order, it doesn't mean the ordering is
random.  It means there is a fixed ordering controlled by the
implementation and not by you.

If you want a random sample, use random.sample().  See the docs for
the random module.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to