Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86355
| References | <3a54074b-2517-472b-9fcc-50348933a959@googlegroups.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2015-02-24 16:16 -0700 |
| Subject | Re: strip bug? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19153.1424819861.18130.python-list@python.org> (permalink) |
On Tue, Feb 24, 2015 at 4:05 PM, <baykiwi@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.
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