1
Can someone tell me if I can make it work:
a = ['<a1>', '<a2>', '<a3>', '', '<a5>']
b = ['<b1>', '<b2>', '<b3>', '', '<b5>']
txt = '<a1> test <a2> test <a3> test <a4> test <a5>'
txt.replace(''.join([i for i in a if i is not '']),''.join([j for j in b if j is not '']))
What is the intended outcome, what do you want
txt
either at the end?– Miguel
@Miguel I want to
txt
has the values ofa
replaced by those ofb
– Nasca