import res = 'this1234is5678it'l = re.split('(\d+)',s)print (l)
Standard input is empty
['this', '1234', 'is', '5678', 'it']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!