正则-分割/替换
##以匹配符号切割list
import re
s = 'afd4afagf4dgsh'
b = re.split('4', s)
print(b)#['afd', 'afagf', 'dgsh']
##以匹配符号切割,在以符号连接成str
import re
s = 'afd4afagf4dgsh'
b = re.sub('4', '*', s)
print(b)#afd*afagf*dgsh
##以匹配符号切割list
import re
s = 'afd4afagf4dgsh'
b = re.split('4', s)
print(b)#['afd', 'afagf', 'dgsh']
##以匹配符号切割,在以符号连接成str
import re
s = 'afd4afagf4dgsh'
b = re.sub('4', '*', s)
print(b)#afd*afagf*dgsh