fork download
  1. import re
  2.  
  3. print(re.sub(r'000([1-9]|$)', r' \1', '76000123000100000101000').strip())
Success #stdin #stdout 0.03s 9536KB
stdin
Standard input is empty
stdout
76 123 100 101