<div class="gmail_quote">On Thu, Jan 28, 2010 at 5:52 PM, elsa <span dir="ltr"><<a href="mailto:kerensaelise@hotmail.com">kerensaelise@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
       choice = random.choice(range(1,sum([i[0] for i in myList])+1))<br></blockquote></div><br>That's the line causing the problem.  It's generating all of the numbers between 1 and your sum, then picking one.  Try the following instead, which will pick a number between 1 and your sum without generating each and every one.<br>
<br>choice = random.randrange(1, sum(i[0] for i in myList)+1)<br><blockquote style="margin: 1.5em 0pt;">--<br>
Daniel Stutzbach, Ph.D.<br>
President, <a href="http://stutzbachenterprises.com">Stutzbach Enterprises, LLC</a>
</blockquote>