Mayday 7-14


animals = ["aardvark", "badger", "duck", "emu", "fennec fox"]
print duck_index

print animals
here comes error,what does that mean?: Make sure to pass duck_index as the first argument in insert()


Hi @javaace19518 ,

Codecademy had you use animals.index("duck") to find the index of "duck" within the animals list, and then assign it to duck_index. The intent is to have you then use duck_index to access the animals list for performing the insertion, as follows ...

animals.insert(duck_index, "cobra")


GAH. I had a functioning piece of code that accomplished the same goal differently. Sometimes the semantics can be a pain. But I can see what the point of this is. Creating specific variables to call lines from indices.