import remystring = "\n this \n 1. is \n 2. some \n 3. text \n"k = re.sub(r"\n (\d)", r"\1", mystring)print(k)
Standard input is empty
this 1. is 2. some 3. text
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!