# your code goes
a = ['<a1>', '<a2>', '<a3>', '', '<a5>']
b = ['<b1>', '<b2>', '<b3>', '', '<b5>']
txt = '<a1> test <a2> test <a3> test <a4> test <a5>'
ab = zip(a, b) # relacionar as duas
for a_val, b_val in ab:
txt = txt.replace(a_val, b_val)
print(txt)
IyB5b3VyIGNvZGUgZ29lcwphID0gWyc8YTE+JywgJzxhMj4nLCAnPGEzPicsICcnLCAnPGE1PiddCmIgPSBbJzxiMT4nLCAnPGIyPicsICc8YjM+JywgJycsICc8YjU+J10KdHh0ID0gJzxhMT4gdGVzdCA8YTI+IHRlc3QgPGEzPiB0ZXN0IDxhND4gdGVzdCA8YTU+JwoKYWIgPSB6aXAoYSwgYikgIyByZWxhY2lvbmFyIGFzIGR1YXMKZm9yIGFfdmFsLCBiX3ZhbCBpbiBhYjoKICAgIHR4dCA9IHR4dC5yZXBsYWNlKGFfdmFsLCBiX3ZhbCkKCnByaW50KHR4dCk=