strip bug?
Ian Kelly
ian.g.kelly at gmail.com
Tue Feb 24 18:16:57 EST 2015
On Tue, Feb 24, 2015 at 4:05 PM, <baykiwi at gmail.com> wrote:
>>>> 'http://xthunder'.strip('http://')
> 'xthunder'
>>>> 'http://thunder'.strip('http://')
> 'under'
>>>>
This removes all leading and trailing occurrences of the characters in
the string 'http://', not the exact substring 'http://'. For that, use
either the str.replace method or slicing.
> I could understand backslash but forward slash?
I don't understand the question.
More information about the Python-list
mailing list