Python Boolean Logic
Bill
BILL_NOSPAM at whoknows.net
Sat Sep 23 05:02:13 EDT 2017
Chris Warrick wrote:
>
> This outputs "False is false", because you used the variable in your
> expression. You can just do this:
>
>>>> print("s is", s)
> This will print "s is False".
>
Ah, good point! But I do like "self-documenting" output (so I don't
mind seeing s)---if you had 5 or more statements a in a row like that,
you would "miss" seeing the string s! : )
Bill
More information about the Python-list
mailing list