Quoting Nathan Pinno <[EMAIL PROTECTED]>:

> Is it possible to create a def that not only deals cards, but also
> assigns a value to each rank, except that the Jacks, Queens, and Kings
> all are the same value as the 10s?
> If this is possible, how should I go about doing this?

Nearly everything is possible; you just have to order your thoughts correctly 
:-)

In this case, you're looking for a way of mapping from cards to values.  Python
has  a mapping type built in, called a dictionary.  You can read about it here:
http://docs.python.org/tut/node7.html#SECTION007500000000000000000 and here:
http://docs.python.org/lib/typesmapping.html

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

Reply via email to