标签:strip span col name end upper 实现 style int
name =" aleX" #去掉两边空格 print(name.strip()) print(name.startswith(‘al‘)) print(name.endswith(‘X‘)) name2 = name. replace (‘l‘,‘p‘) print(name2) print(name.split( ‘l‘)) print(name.upper()) print(name.lower()) print(name[1]) print(name[0:2]) print(name[-1:-3:-1]) print(name[-2:]) print(name.index(‘e‘)) print(name[0:-1])
标签:strip span col name end upper 实现 style int
原文地址:https://www.cnblogs.com/hxssb/p/11079892.html