Maintaining Order bug


In the section titled Maintaining Order, I have this code:

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

# Your code here!

print animals # Observe what prints after the insert operation

The error says:
Oops, try again. Did you forget to assign a value to duck_index?
Please help. Thanks!:grin::grin:


Instead of animals.insert(2, "cobra")

try animals.insert(duck_index, "cobra")


you didnt put the index on line 2.
put duck_index(2)



Not working and by the way the error says I didn't assign a value to duck_index


Your idea, worked though.