On 2/2/11 8:45 PM, Chris Rebert wrote:
Also, your question isn't Mac-specific, so for future reference, it
would have been better posed to the more general and widely-read
python-list (http://mail.python.org/mailman/listinfo/python-list ).
or better yet, the python tutor list:
http://mail.pyt
> On 3 February 2011 07:48, Henning Hraban Ramm wrote:
>> Am 2011-02-03 um 05:45 schrieb Chris Rebert:
>>
if (card == "Hearts" or card == "Diamonds"):
print "That card is Red"
elif (card == "Spades" or card == "Clubs"):
print "That card is Black"
>>>
>>> Note that th
If you have only 4 type of cards, it's even better to write a oneliner :
print card in ["Hearts", "Diamonds"] and "That car is red" or "That card is
> Black"
On 3 February 2011 07:48, Henning Hraban Ramm wrote:
> Am 2011-02-03 um 05:45 schrieb Chris Rebert:
>
>
> if (card == "Hearts" or card
Am 2011-02-03 um 05:45 schrieb Chris Rebert:
if (card == "Hearts" or card == "Diamonds"):
print "That card is Red"
elif (card == "Spades" or card == "Clubs"):
print "That card is Black"
Note that the parentheses are completely unnecessary and not
idiomatic style.
if card == "Hea
On Wed, Feb 2, 2011 at 7:23 PM, John Parker wrote:
> All,
>
> I have written this test code
>
> if (card == "Hearts" or card == "Diamonds"):
> print "That card is Red"
>
> elif (card == "Spades" or card == "Clubs"):
> print "That card is Black"
Note that the parentheses are completely unn