V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
relic
V2EX  ›  Python

python lstrip

  •  
  •   relic · 2016-08-29 13:34:53 +08:00 · 2491 次点击
    这是一个创建于 2788 天前的主题,其中的信息可能已经有所发展或是发生改变。
    15 条回复    2016-08-29 22:17:38 +08:00
    raptium
        1
    raptium  
       2016-08-29 13:41:13 +08:00
    Return a copy of the string with leading characters removed.
    fangdingjun
        2
    fangdingjun  
       2016-08-29 13:42:36 +08:00
    不是 bug, 你可以用 s.replace('statlogs.', '', 1)

    仔细看文档
    lstrip(...)
    S.lstrip([chars]) -> string or unicode

    Return a copy of the string S with leading whitespace removed.
    If chars is given and not None, remove characters in chars instead.
    If chars is unicode, S will be converted to unicode before stripping
    Verydiao
        3
    Verydiao  
       2016-08-29 13:43:13 +08:00
    楼主头像好带劲,澄海 3C 传送权杖思密达!
    kxxoling
        4
    kxxoling  
       2016-08-29 13:52:58 +08:00
    @Verydiao DotA 圣者遗物吧?
    liuxu
        5
    liuxu  
       2016-08-29 13:55:28 +08:00
    3800
    fwings260
        6
    fwings260  
       2016-08-29 14:30:49 +08:00
    看见 3800 头像我就进来了!


    15 分钟, SPE :老子 3800 到手,马上就辉耀!团战怎么输!
    YORYOR
        7
    YORYOR  
       2016-08-29 15:06:20 +08:00
    人在塔在
    laoyur
        8
    laoyur  
       2016-08-29 15:08:00 +08:00
    看不到楼主帖子内容
    ila
        9
    ila  
       2016-08-29 15:21:38 +08:00
    @Verydiao 感觉很熟悉,原来我一直在用。。。
    lixia625
        10
    lixia625  
       2016-08-29 15:22:11 +08:00
    圣剑带一秒
    diydry
        11
    diydry  
       2016-08-29 15:43:48 +08:00
    是要出圣剑了吗 /??
    ooTwToo
        12
    ooTwToo  
       2016-08-29 16:03:05 +08:00
    头像点进来的+1
    yangff
        13
    yangff  
       2016-08-29 16:09:47 +08:00 via Android
    @laoyur +1
    yuedingwangji
        14
    yuedingwangji  
       2016-08-29 22:17:07 +08:00
    看到头像就进来 ..
    yuedingwangji
        15
    yuedingwangji  
       2016-08-29 22:17:38 +08:00
    看到头像就进来 ..
    @Verydiao 现在居然还有人玩 3C 呀,道友你好
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3661 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:54 · PVG 12:54 · LAX 21:54 · JFK 00:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.