Two question from a newbie
Fredrik Lundh
effbot at telia.com
Fri Feb 11 14:30:48 EST 2000
Peter Bittner <bittneph at aston.ac.uk> wrote:
> 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!
newbies have been known to read the
fine manual:
http://www.python.org/doc
start with the tutorial. browse the language reference.
then the read the first chapters in the library manual
(covering builtin operations).
</F>
More information about the Python-list
mailing list