[Tutor] Is it possible to...
alan.gauld at freenet.co.uk
Mon Aug 15 10:16:25 CEST 2005
> 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
> all are the same value as the 10s?
Yes. And you probably need to use a dictionary to hold the value
> Sorry if I'm asking what for most people is a basic question,
Nope, this is a very good question. I haven't been paying attention to
the card dealing functions posted recently but I assume adding in a
dictionary to assign a value per card dealt wouldn't be too hard.
You could then return the cards as tuples or somesuch...
More information about the Tutor