fork download
  1. import re
  2. es = ["49,331,076","23,136,275","139,500 (est.)","124,000","522 (ranked 23 of 137)"]
  3. regex = re.compile("\([^()]*\)")
  4. listy = []
  5. for x in es:
  6. listy.append(regex.sub('', x).strip())
  7. print(listy)
Success #stdin #stdout 0.01s 27712KB
stdin
Standard input is empty
stdout
['49,331,076', '23,136,275', '139,500', '124,000', '522']