fork download
  1. import re
  2. s = 'get 5 and 9'
  3. p = re.compile(r'\b(?:or|and)\b|[-0-9.+/*()<>]')
  4. s = " ".join(p.findall(s))
  5. print(s)
Success #stdin #stdout 0.02s 27744KB
stdin
Standard input is empty
stdout
5 and 9