7/14 Maintaining Order



I, to my knowledge, am doing everything correctly, but it keeps on saying "Oops, try again. Did you forget to assign a value to duck_index?" I don't know how to solve this error message and it is beginning to drive me crazy.

Any help is appreciated.


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


Your second line is a syntax error. You have

duck_index =

but nothing is assigned to it. Delete that and the rest looks okay.


I feel dumb now, haha.

Thank you so much!

Oh, by the way, how do you change your forum username on here?


No problem! I'm not sure if you can change your username. I'd click your account and go to your preferences to see if you can change it there.


I went in my preferences and changed it.

Thank you for helping me, Ropnog!

Can this thread be closed now?