>>> import re>>> string = 'YAN300,000,000'>>> match = re.search(r'([D]+)([d,]+)', string)>>> output = (match.group(1), match.group(2).replace(',',''))>>> output('YAN', '300000000')
(感谢zhangyangyu指出我没有完全回答问题)
欢迎分享,转载请注明来源:内存溢出
>>> import re>>> string = 'YAN300,000,000'>>> match = re.search(r'([D]+)([d,]+)', string)>>> output = (match.group(1), match.group(2).replace(',',''))>>> output('YAN', '300000000')
(感谢zhangyangyu指出我没有完全回答问题)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)