7/14 Maintaining Order


#1



https://www.codecademy.com/courses/python-beginner-en-pwmb1/1/4?curriculum_id=4f89dab3d788890003000096

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.

Thanks!


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

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

print animals # Observe what prints after the insert operation


#2

Your second line is a syntax error. You have

duck_index =

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


#3

I feel dumb now, haha.

Thank you so much!

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


#4

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.


#5

I went in my preferences and changed it.

Thank you for helping me, Ropnog!

Can this thread be closed now?