Re: [Tutor] String method "strip()" not working

2015-03-07 Thread Alan Gauld
On 07/03/15 15:17, Mark Lawrence wrote: S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unic

Re: [Tutor] String method "strip()" not working

2015-03-07 Thread Mark Lawrence
On 07/03/2015 14:54, Alan Gauld wrote: On 07/03/15 13:15, Akash Shekhar wrote: I am trying to learn how to use strip() method. It is supposed to cut out all the whitespace as I read in the tutorial. Read it again more closely. --- Help on built-in function strip: strip(...)

Re: [Tutor] String method "strip()" not working

2015-03-07 Thread Dave Angel
On 03/07/2015 08:15 AM, Akash Shekhar wrote: I am trying to learn how to use strip() method. It is supposed to cut out all the whitespace as I read in the tutorial. But the code is not working. Here's my code: sentence = "Hello, how are you?" print(sentence) print(sentence.strip())

Re: [Tutor] String method "strip()" not working

2015-03-07 Thread Alan Gauld
On 07/03/15 13:15, Akash Shekhar wrote: I am trying to learn how to use strip() method. It is supposed to cut out all the whitespace as I read in the tutorial. Read it again more closely. --- Help on built-in function strip: strip(...) S.strip([chars]) -> string or unicode

[Tutor] String method "strip()" not working

2015-03-07 Thread Akash Shekhar
I am trying to learn how to use strip() method. It is supposed to cut out all the whitespace as I read in the tutorial. But the code is not working. Here's my code: sentence = "Hello, how are you?" > > >> print(sentence) > > >> print(sentence.strip()) > > >> input("\n\nPress enter key to exit.")