On 12 August 2010 10:40, Evert Rol <[email protected]> wrote: >>>> a = "my file number" >>>> a.replace(' ', '\\ ') > 'my\\ file\\ number'
What if a has more than 1 space between words? Then I think this would
be a safer way.
>>> print "\\ ".join("my file number".split())
my\ file\ number
Greets
Sander
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
