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
You can use regex for this.
p1 = re.compile("\d") #match digits p2 = re.compile("\D") match non-digits currency_symbol = p1.split(cur_str)[0] value = int("".join([group for group in p2.split(cur_str)]))