Oops, try again. It looks like "cobra" is not at the correct location (index 4)


animals = ["aardvark", "badger", "duck", "emu", "fennec fox"]
duck_index = animals.index("duck")# Use index() to find "duck"

print duck_index# Your code here!

animals.insert(duck_index, "Cobra")

print animals # Observe what prints after the insert operation

Any opinions?


There is a strange situation when you can't continue and it gives you the error which is the title here, when: :

animals.insert(duck_index, "Cobra") is not on line 4, at least that is what solved it for me.

If someone sees this I am curious what was the problem, as changing lines should not be an issue.


You need to make sure cobra has a lower case "c" and not a capital like you have in your example

animals.insert(duck_index, "cobra")