Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70070 > unrolled thread

Re: the logical operation confused me

Started byTerry Reedy <tjreedy@udel.edu>
First post2014-04-10 19:09 -0400
Last post2014-04-10 19:09 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: the logical operation confused me Terry Reedy <tjreedy@udel.edu> - 2014-04-10 19:09 -0400

#70070 — Re: the logical operation confused me

FromTerry Reedy <tjreedy@udel.edu>
Date2014-04-10 19:09 -0400
SubjectRe: the logical operation confused me
Message-ID<mailman.9154.1397171398.18130.python-list@python.org>
On 4/10/2014 7:02 PM, length power wrote:
>  >>> "ok" or "not ok"
> 'ok'
>  >>> "ok" and "not ok"
> 'not ok'
>  >>>
>
> why "ok" or "not ok" output "ok"  , "ok" and "not ok"  output "not ok" ?

This is explained in our fine manual.
https://docs.python.org/2/reference/expressions.html#boolean-operations

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web