Duck Cobra Index


#1


https://www.codecademy.com/courses/python-beginner-en-pwmb1/1/4?curriculum_id=4f89dab3d788890003000096

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")
animals.insert(duck_index,"corbra")
print animals

How could the index for duck be the 4 in the error message?

Replace this line with your code.


#2

A typo just there...cobra not corbra


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.