#!usr/bin/env python
# -*- coding:utf-8 -*-
def trim(S,s):
while S.find(s) != -1:
p = S.find(s)
S1 = S[:p]
S2 = S[p+1:]
S = S1 + S2
return S
Sign in to make a reply
昔有野狐听禅
#!usr/bin/env python
# -*- coding:utf-8 -*-
def trim(S,s):
while S.find(s) != -1:
p = S.find(s)
S1 = S[:p]
S2 = S[p+1:]
S = S1 + S2
return S