Two question from a newbie

Peter Stoehr peter.stoehr at sdm.de
Fri Feb 11 11:21:26 EST 2000


Hi Peter,

how about reading manuals?

Peter Bittner schrieb:
> 
> 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;
http://www.python.org/doc/current/lib/boolean.html

> 
>   2.) What does str(...) do?  (I've already posted this, sorry!)
http://www.python.org/doc/current/lib/built-in-funcs.html#l2h-145
> 
> 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
> +--------------------------

Greetings from Munich
    Peter



More information about the Python-list mailing list