Could someone explain me something!
Cliff Wells
LogiplexSoftware at earthlink.net
Sat Dec 28 12:56:15 EST 2002
On Sat, 2002-12-28 at 10:19, Ole Jensen wrote:
> I am indeed just getting started with python, and was just toying around
> when I found something I didn't understand
>
> (its very simple so please don't laugh)
>
> when typed this into the python shell:
> print "5+5 =";5+5
>
> the result becomes:
> 5+5 =
> 10
>
> so I am thinking that if you use a [,] you get a spacing and if you use a
> [;] you get a line break
The semicolon is an end of line delimiter, so
>>> print "5+5 =";5+5
is the equivalent of
>>> print "5+5 ="
5+5 =
>>> 5+5
10
>>>
> but when you write it into a .py file the result differs to just this:
> 5+5
Actually, I would expect the output to be
5+5 =
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
More information about the Python-list
mailing list