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(...)
     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 unicode before stripping

Presumably Python 2 (or earlier Python 3) help output. In Python 3 strings are always unicode, so that last line has gone.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to