7. mainttaining order(done)


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

Your code here!

duck_index = animals.index("duck")
animals.insert(duck_index, "cobra")
print animals # Observe what prints after the insert operation
where did i go wrong


The above line may raise an error.

The above is not doing anything, and is not needed. You have the correct code on the next line.


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