Why not sorting the items and throw out all multiples until you reach
the fixed length ?
Klaus Ramelow
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Adam Cripps wrote:
> I've not worked with Sets before but will give it a go. Is there a way
> of turning the Set back to a list?
list(mySet)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 1/11/07, Adam Cripps <[EMAIL PROTECTED]> wrote:
> On 1/11/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> > Adam Cripps wrote:
> > > I have a list which comprises of simple random arithmetic problems for
> > > teachers to give to their pupils. This list must be a set length (if
> > > the teacher a
Adam Cripps wrote:
> I have a list which comprises of simple random arithmetic problems for
> teachers to give to their pupils. This list must be a set length (if
> the teacher asks for 10 questions, they should get 10 questions), but
> should not have any duplicates.
>
> I've seen the use of sets