import res = "Helllo\b\bo world"r = re.compile("^\b+|[^\b]\b")while r.search(s): s = r.sub("", s)print(s)
Standard input is empty
Hello world
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!