python 提取字符串中的数字
import re
lg = '15001927982ttcc'
lgttcc = re.sub("\D", "", lg)
lgttcc
Out[5]: '15001927982'
int(lgttcc)
Out[6]: 15001927982
import re
lg = '15001927982ttcc'
lgttcc = re.sub("\D", "", lg)
lgttcc
Out[5]: '15001927982'
int(lgttcc)
Out[6]: 15001927982