# your code goes here import re a = "%I'm a sentence.|"b = re.sub(r"%(.*?)\|", r"<\1>", a)print(b)
Standard input is empty
<I'm a sentence.>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!