I have two lists as following
A=['a','b','c']
B=['0_txt1','0_txt2','1_txt1','1_txt2','2_txt1','2_txt2']
I should rename prefix number in B elements with corresponding list element from A, so the desired output is:
B=['a_txt1','a_txt2','b_txt1','b_txt2','c_txt1','c_txt2']
How can I do this by reading and replacing elements? Thank you!