How to display position of an element in an array? [closed]

I think you have a simple, one-line change.
You get the name instead of the index, because that’s exactly what you told it to print. Instead, use this:

    print('The index of this name is ', index)

Your original went to the extra trouble to look up the name in that location.

Leave a Comment