how to print out the indexes in a list with repetitive elements,"[1, 4, 5, 6, 7]"