import reprint (re.sub(r"(?![\d_])\w","X","dfäg"))print (re.sub(r"[^\W\d_]","X","dfäg"))# => XXXX
Standard input is empty
XXXX XXXX
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!