import res = 'get 5 and 9'p = re.compile(r'\b(?:or|and)\b|[-0-9.+/*()<>]')s = " ".join(p.findall(s))print(s)
Standard input is empty
5 and 9
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!