April 10th, 2004, 02:03 PM
How do I force the print not to print spaces?
$ 12343 $
is printed from this line
but what I want is
April 10th, 2004, 04:43 PM
Using a formatted string:
See Python docs for more info - Python Library Reference Section 188.8.131.52
Last edited by Grim Archon; April 10th, 2004 at 04:47 PM.
April 12th, 2004, 03:21 AM
You can also use the + operator to concatenate the variable in the middle, without the spaces i.e. print '$' + self.tok + '$'. This does however require self.tok to be a string. if it isnt then you will need to type cast the variable using the built-in str() function.