Two question from a newbie

Fred L. Drake, Jr. fdrake at acm.org
Fri Feb 11 11:06:41 EST 2000


Peter Bittner writes:
 >  1.) How do I implement ORs and ANDs in an if-statment?
 > 
 >    - e.g. I'd like to have this C-code in Python:
 > 
 >    if (x.mode == "view" || x.mode == "modify")
 >       myMode = x.mode;

    if (x.mode == "view" or x.mode == "modify"):
       myMode = x.mode


  -Fred

--
Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives




More information about the Python-list mailing list