I have a list:
letters = ('1', '2', '3', '5', '8', '13', '21')
Having number 8, I can get it's index in letters as:
letters.index('8')
No, I have an array which contains only numbers that are in letters.
numbers = [3, 8, 13, 21, 5]
How do I call index (or similar) function on each element?
what I want to get is [2, 4, 5, 6, 3]
Is there such function as index that can grab array instead on single element? If that is required letters can be changed to array
lettersis a tuple, not a list.numbersis a list, not an array.