fork download
  1. import re
  2.  
  3. s = 'h.e.ll.o w.o.r.l.d'
  4. print(re.sub(r'\w+(?:\.+\w+)*', lambda x: x.group(0).replace('.', ''), s))
Success #stdin #stdout 0.04s 9644KB
stdin
Standard input is empty
stdout
hello world