one=['nlo_90', 'nlo_90', 'nhi_88']
two=['12', '12', '84']
three=[['a','a','b','c'], ['a','a','b','c'], ['b','g','g','b']]
new_three=[list(dict.fromkeys(q)) for q in three]
z=zip(one,two,new_three)
for a,b,c in z:
c_str = ', '.join(c)
print(f'{a}, {b}, {c_str}')
I need to remove duplicate data after i combine the lists using zip()
the output from above code is
nlo_90, 12, a, b, c
nlo_90, 12, a, b, c
nhi_88, 84, b, g
my desired output is
nlo_90, 12, a, b, c
nhi_88, 84, b, g
I tried to code this new=list(dict.fromkeys(z))
to remove duplicate but it shows error
TypeError: unhashable type: 'list'