Rosa :
I have 2 lists:
b = ['zero', 'one', 'two']
c = [0, 0, 0, 1, 1, 2, 1, 0, 2, 0]
Is there an elegant way to change every element in c
and get
c = ['zero', 'zero', 'zero', 'one', 'one', 'two', 'one', 'zero', 'two', 'zero']
Prakhar Londhe :
I think just
c = [b[i] for i in c]
would do the trick