Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86357
| From | Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> |
|---|---|
| Subject | Re: strip bug? |
| Date | 2015-02-25 00:25 +0100 |
| References | <3a54074b-2517-472b-9fcc-50348933a959@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19154.1424820337.18130.python-list@python.org> (permalink) |
On 25.02.2015 00:05, baykiwi@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'
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
strip bug? baykiwi@gmail.com - 2015-02-24 15:05 -0800 Re: strip bug? Eduardo <xcesar@gmail.com> - 2015-02-24 15:15 -0800 Re: strip bug? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-24 16:16 -0700 Re: strip bug? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-02-25 00:19 +0100 Re: strip bug? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-02-25 00:25 +0100 Re: strip bug? Chris Kaynor <ckaynor@zindagigames.com> - 2015-02-24 15:22 -0800 Re: strip bug? Rustom Mody <rustompmody@gmail.com> - 2015-02-25 03:03 -0800 Re: strip bug? babyG <bintadoma20@yahoo.com> - 2015-02-27 04:18 -0600
csiph-web