I would like to replace elements of a list b for elements from another list a
#my list is
b = [('ba'),
('bb'),
('bc'),
('bd'),
('be'),
('bf'),
('bg'),
('bh'),
('bi')]
#The second list
a = [('bc_1'),
('bd_1'),
('be_1'),
('bf_1'),
('bg_1')]
I would like to replace 'bc', 'bd', 'be', 'bf', 'bg' with 'bc_1', 'bd_1', 'be_1', 'bf_1', 'bg_1'
I tried with the next code
for i in a:
if i in b:
a = a.str.replace(i)
but it does not work