print "foo", without a space
mikael.johansson at helsinki.xx
Fri Nov 12 16:21:40 CET 1999
> > Is there another way of getting print to not make a newline than
> > using:
> > print "foo", ?
OK, thanks to all who replied, this was what I really wanted to know.
The other tricks where known to me, but the .softspace thingie seemed
interesting (even if not that usable :-)
The reason for me wanting the print-statement to not make an auto-
space was just to have one simple output-command.
The reason for this again is that I've been assisting in a
thermodynamics course here at the university. I've been responsible
for trying to get the students to do some small proggies (calc.
Gibbs energies etc.), and none of them had any programming experience
to start with, so I chose Python as it seemed (and still seems) a
nice and quite easily adoptable language. I hadn't programmed Python
before either, but now I love it :-) But anyway, the concept of
stdout and so on are a bit too complicated to get through to the
students in the very limited time I have (it's not supposed to be a
programming course after all).
Have a nice day,
More information about the Python-list