On Tue, Mar 10, 2015 at 2:27 PM, lou xiao <lox.xiao at gmail.com> wrote: > tiny➜ ~ python > Python 2.7.5+ (default, Feb 27 2014, 19:37:08) > [GCC 4.8.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> a='device_info' >>>> a.lstrip('device') > '_info' >>>> a.lstrip('device_') > 'nfo' On one hand, this is the "development of python itself" list; this issue was more aimed to the general python list, of you was sure that this is a real bug, to the issue tracker. On the other hand, this is not a bug! If you pass a parameter to lstrip it will (quoted from its help) "remove characters in chars instead.", so the moment you pass "device_", it removes all those characers from the left... note that the 'i' is removed twice. Regards, -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ Twitter: @facundobatista
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4