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


#1

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?


#2

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.


#3

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")