fork download
  1. import re
  2. test_str = "2890191245"
  3. print(re.sub("(?<=\d)(?=(\d{3})+$)", ",", test_str).split(","))
Success #stdin #stdout 0.02s 9936KB
stdin
Standard input is empty
stdout
['2', '890', '191', '245']