import res = 'e004_n07'res = re.sub(r'([a-zA-Z])0+', r'\1', s)print(res)
Standard input is empty
e4_n7
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!