w=' abcdefg '
w=w.strip() #strip默认移除字符串的首尾空白格
w=' abcdefg '
w=w.strip()
w.strip('ab') #strip移除字符串的首尾为'ab'的字符串
w.strip('g')
w=' abcdefg '
w=w.strip() #strip默认移除字符串的首尾空白格
w=' abcdefg '
w=w.strip()
w.strip('ab') #strip移除字符串的首尾为'ab'的字符串
w.strip('g')