I have a string like \'$200,000,000\' or \'Yan300,000,000\'
\'$200,000,000\'
\'Yan300,000,000\'
I want to split the currency and number, and output a tuple (\'$\', \'200
(\'$\', \'200
>>> import re >>> string = 'YAN300,000,000' >>> match = re.search(r'([\D]+)([\d,]+)', string) >>> output = (match.group(1), match.group(2).replace(',','')) >>> output ('YAN', '300000000')
(Thanks to zhangyangyu for pointing out I hadn't fully answered the question)