On 8/5/05, Nathan Pinno <[EMAIL PROTECTED]> wrote:
>  
> Hi all, 
>   
> Is there a quicker method than the following? 
>   
> import random
> numbers = [0,1,2,3,4,5,6,7,8,9,10,11,12]
> cards =
> ["Ace","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Jack","Queen","King"]
> hand = {numbers:cards} 
>   

hand is invalid syntax, list objects are unhashable. deal() is also
invalid syntax, and will throw a type error. Fixing these might show
you a way to do things quicker. List comprehensions might be useful to
you in this context.

Luis.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to