strip bug?

Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Tue Feb 24 18:25:27 EST 2015


On 25.02.2015 00:05, baykiwi at gmail.com wrote:
>>>> 'http://xthunder'.strip('http://')
> 'xthunder'
>>>> 'http://thunder'.strip('http://')
> 'under'
>>>>
>
> I could understand backslash but forward slash?
>

You are misunderstanding what the argument to strip does. Look at this:

 >>> 'http://xthunder'.strip('/hpt:')
'xthunder'





More information about the Python-list mailing list