摘要:
1、 startswith(): 判断字符串是否以某个子串开始,是则返回True,否则返回False 示例: my_str = 'hello world and my and test and python' # 1、 startswith(): 判断字符串是否以某个子串开始,是则返回True,否则 阅读全文
摘要:
1、lstrip():删除左侧空白字符 实例: my_str = ' hello world and my and test and python ' # 原始字符串 print(my_str) # lstrip() 删除左侧空白字符 my_str1 = my_str.lstrip() print( 阅读全文