Python中字符串处理方法例子
共八种方法 method()#<str>.<method>.pystr = "Great Day"#str.lower()/str.upper()print("1.{}".format(str.lower()))print("2.{}".format(str.upper()))#str.center(width[,fillchar])以str为中心,两侧填充charprint("8.{}".format(str.center(20,"=")))#str.count(s
原创
2020-08-10 06:20:22 ·
198 阅读 ·
0 评论