摘要:
lstrip&rstrip s='khffhksfksf' print(s.lstrip('kn')) print(s.rstrip('sf')) hffhksfksf khffhksfk lower&upper print(s.upper()) KHFFHKSFKSF startswith&edn 阅读全文
摘要:
按索引取值 name='yryriw 9999ndlaanl' print(name[0]) print(name[-1]) y l 切片:步长为正数,从左到右切片 print(name[0:7]) print(name[0:8]) print(name[0:7:2]) print(name[0:: 阅读全文