April 10th, 2004, 01: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, 03:43 PM
Using a formatted string:
See Python docs for more info - Python Library Reference Section 126.96.36.199
Last edited by Grim Archon; April 10th, 2004 at 03:47 PM.
April 12th, 2004, 02: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.