Unable to cross Python Lists and Dictionaries Maintaining Order test


#1




I am doing everything correct but there is issue related to order.


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

# Your code here!
animals.insert(duck_index, "Cobra")
cobra_index = animals.index("Cobra")
print cobra_index

print animals # Observe what prints after the insert operation


#2

here:

animals.insert(duck_index, "Cobra")

the validation of the exercise is case sensitive, so should be "cobra"


#3

Thanks for correcting me. :slight_smile:


#4