import res = "hello world123"print(re.findall(r'[^\W\d_]+|\d+', s))
Standard input is empty
['hello', 'world', '123']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!