zoukankan      html  css  js  c++  java
  • 字符串积木

    # 开头nice
    # b=a.capitalize()
    
    # 小case服了
    # b=a.casefold()
    
    # 滋润它
    # b=a.center(20,'$')
    
    # 一颗颗抗它
    # b=a.count('ec',9)
    
    # 结尾是它
    # b=a.endswith('c')
    
    # 开头是它
    # b=a.startswith('c')
    
    # 方出它
    # b=a.find('ex',5,7)
    
    # 方没它
    # a='I am {a},{b},{c}'
    # b=a.format(a=2,b=3,c=4)
    
    # 方没它们
    # b=a.format_map({'a':2,'b':3,'c':4})
    
    # 一大哥
    # b=a.index('a')
    
    # 你是那么多O
    # b=a.isalnum()
    
    # 一个不私奔排队
    # b=a.expandtabs(15)
    
    # 你是欧法
    # b=a.isalpha()
    
    # 你是第三名
    # b=a.isdecimal()
    
    # 必须都给他
    # c=a.isdigit()
    
    # 你是爱登堡
    # b=a.isidentifier()
    
    # 必须难不倒哥
    # b=a.isnumeric()
    
    # 你是朴玲朴玲
    # b=a.isprintable()
    
    # 是被子
    # b=a.isspace()
    
    # 大头
    # b=a.title()
    
    # 必须抬头
    # b=b.istitle()
    
    # 装进
    # b=t.join(a)

    # 这不累
    # b=a.replace('你','1',2)
    # 一扎 # b=a.ljust(50,'*') # 然后一扎 # b=a.rjust(50,'*') # 这分儿 # b=a.zfill(50) # 乐儿 # b=a.lower() # 你是乐儿 # b=a.islower() # 大盆儿 # b=a.upper() # 你是大盆儿 # b=a.isupper() # 一开始死追不 # b=a.lstrip('a') # 然后死追不 # b=a.rstrip('s') # 死追不 # b=a.strip('as') # 支招儿没看传仨 # b=str.maketrans('ajkefsd','1234567') # 传仨累他 # c=a.translate(b) # 扒他身 # b=a.partition('s')

    # 然后扒他身 # b=a.rpartition('s') # 撕开不理它 # b=a.split('s',7) # 撕开不理那里 # b=a.splitlines(True) # 三五不可换 # b=a.swapcase()
  • 相关阅读:
    Javascript 返回上一页
    html中link和import方式导入CSS文件的区别
    Leecode no.76 最小覆盖子串
    Leecode no.344 反转字符串
    Leecode no.167 两数之和 II 输入有序数组
    Leecode no.567 字符串的排列
    遍历目录和文件信息
    JAVASCRIPT显示农历的日历
    asp.net上传图片加水印(c#)
    asp.net XML操作类
  • 原文地址:https://www.cnblogs.com/shengbei/p/8855256.html
Copyright © 2011-2022 走看看