> I think the best strategy for this problem would be to build an index of
> the offset of the start of each line, and then randomly select from this
> list.
> that makes each line equally probable, and you can set up your class so
> that the index is only built on the first call to the function.
> -Luke

Oh fudge! I knew there was a "best-way-to-do-it". Now I'm upset cuz i didn't 
think of it first. ;-)

JS 

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to