fork(1) download
  1. import re
  2. p = re.compile(r'\w+|[^\w\s]+')
  3. s = "There is light!"
  4. print(p.findall(s))
Success #stdin #stdout 0.01s 9024KB
stdin
Standard input is empty
stdout
['There', 'is', 'light', '!']