Two question from a newbie

Peter Bittner bittneph at aston.ac.uk
Fri Feb 11 10:59:42 EST 2000


I've got two simple questions:

 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;

  2.) What does str(...) do?  (I've already posted this, sorry!)

I've seen
      print '....' + str(text) + '...'
in some code (in a function definition).
What does this 'str(...)' really do? - Is it absolutely necessary??

Please, e-mail!

Peter

| Peter H. Bittner
| International Student at Aston University
| e-mail: bittneph at aston.ac.uk
| web: http://beam.to/bimbo
+--------------------------



More information about the Python-list mailing list