[Tutor] function for removing all white spaces from a string

2007-10-01 Thread Tim
Hello, after reading the responses to athread in 2004 [1] I am wondering why there is no easy function in python to remove all white spaces from a string. Like: i am very fine to iamveryfine In IDL there's just one simple function which does this: STRCOMPRESS [2]. Is there really not yet

Re: [Tutor] function for removing all white spaces from a string

2007-10-01 Thread Alan Gauld
Tim [EMAIL PROTECTED] wrote after reading the responses to athread in 2004 [1] I am wondering why there is no easy function in python to remove all white spaces from a string. i am very fine to iamveryfine You can use string.replace. 'I am very fine'.replace(' ','') 'Iamveryfine'

Re: [Tutor] function for removing all white spaces from a string

2007-10-01 Thread Bill Campbell
On Mon, Oct 01, 2007, Alan Gauld wrote: Tim [EMAIL PROTECTED] wrote after reading the responses to athread in 2004 [1] I am wondering why there is no easy function in python to remove all white spaces from a string. i am very fine to iamveryfine You can use string.replace. 'I am

Re: [Tutor] function for removing all white spaces from a string

2007-10-01 Thread Ricardo Aráoz
Tim wrote: Hello, after reading the responses to athread in 2004 [1] I am wondering why there is no easy function in python to remove all white spaces from a string. Like: i am very fine to iamveryfine In IDL there's just one simple function which does this: STRCOMPRESS [2]. Is