Please help!


#1



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


I don't see why "Make sure to pass duck_index as the first argument in insert() " because it has a 2nd index


I thought it would run well


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

animals.insert(2, "cobra")

print animals


#2

Hi @nikuzejl,

Codecademy wants you to use the variable, duck_index, as an argument to the insert method instead of using 2. Your code does correctly place "cobra" within the list, animals, but it bypasses what the exercise intends for you to do, and that is why Codecademy's submission correctness test (SCT) does not accept it.


#3

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