import res = "Helllo<BckSp><BckSp>o world"r = re.compile("^(?:<BckSp>)+|.<BckSp>", flags=re.S)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!