python-字符串处理-去除首尾特定字符

S.strip([chars])


leading and trailing


example:


my_str = '(d)d(d)))'        ->       'd)d(d'


猜你喜欢

转载自blog.51cto.com/13695764/2159482