python的小笔记,一些方法的使用说明 str.strip([chars]) str.strip 去除首尾指定的字符 123456789101112 str = " helloworld " str.strip() #默认去除首尾的空格output: "helloworld"str = "thelloworldt"str.strip("t") #去除头尾的t字符串output: "helloworld" 赞微海报分享
近期评论