I have two lists:
- This one has two elements with strings with delamination ';'.
new_lst = [
'50% Polyester;50% Polyester;50% Polyester;50% Polioster;50% Poliestere',
'50% Elastane;50% Elasthanne;50% Elasthan;50% Elastano;50% Elastan'
]
- The Second list only has one element with same deliminator ';'
newSpecialComp = [
'Back:;Dos:;Rockseite:;Parte trasera:;Schiena:'
]
I need to combine the FIRST element from the first list new_lst with the first element of the second list newSpecialComp.
Desired output to be a list with two elements but first being the combination of the two above.:
Final_lst = [
'Back: 50% Polyester;Dos: 50% Polyester;Rockseite: 50% Polyester;Parte trasera: 50% Polioster;Schiena: 50% Poliestere',
'50% Elastane;50% Elasthanne;50% Elasthan;50% Elastano;50% Elastan'
]
for i, j in zip(newsetSpecialComp, new_lst):
elem2 = ';'.join(map(lambda x:i+' '+x,j.split(';')))
final_lst.append(elem2)
print('Final_lst :', final_lst)
This is what i tried. The output is close but not ideal:
Final_lst = [
'Back: 50% Polyester;Back: 50% Polyester;Back: 50% Polyester;Back: 50% Polioster;Back: 50% Poliestere',
'Dos: 50% Elastane;Dos: 50% Elasthanne;Dos: 50% Elasthan;Dos: 50% Elastano;Dos: 50% Elastan'
]