fork(1) download
  1. import re
  2. cost= "£560,000"
  3. match = re.search(r'([\D]+)([\d,]+)', cost)
  4. output = (match.group(1), match.group(2).replace(',',''))
  5. print (output);
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
('£', '560000')