How to get rid of the space after 'print',?
gherron at aw.sgi.com
Thu Feb 10 19:10:08 EST 2000
Peter Bittner wrote:
> Hi there!
> I'm writing HTML-code with the print statement as follows:
> print '<table border=0><tr>'
> print '<td><b>Author:</b></td><td>', # ,= no newline here
> print '<input ...>' # or put a function call here...
> Between <td> and <input> I want _no_ space, but Python automatically
> inserts one. - How can I force Python not to do this??
Easy, write to stdout directly:
This writes out the bytes of the string exactly, nothing more, nothing
less. No following spaces, no line-ends, and no conversion from other
types, just (binary) byte strings.
Dr. Gary Herron <gherron at aw.sgi.com>
Alias | Wavefront
1218 3rd Ave, Suite 800, Seattle WA 98101
More information about the Python-list