import retext = "\n\n.AAA.x.@@+*@#=..xx000..x..\t.x..\nx*+Y."print(re.sub(r'([\W_])\1+',' ',text))
Standard input is empty
.AAA.x. +*@#= xx000 x .x x*+Y.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!