fork download
  1. # your code goes here
  2.  
  3. a = ['<a1>', '<a2>', '<a3>', '', '<a5>']
  4. b = ['<b1>', '<b2>', '<b3>', '', '<b5>']
  5. txt = '<a1> test <a2> test <a3> test <a4> test <a5>'
  6.  
  7. for idx, val in enumerate(a):
  8. txt = txt.replace(val, b[idx])
  9.  
  10. print(txt)
Success #stdin #stdout 0.01s 9992KB
stdin
Standard input is empty
stdout
<b1> test <b2> test <b3> test <a4> test <b5>