7. Maintaining Order


#1

I can't get this to be right. Someone see my prob?

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

Your code here!

animals.insert(duck_index, "Cobra")

print animals # Observe what prints after the insert operation


#2

If you're using 3.3, print (something_list)
Are you taking this directly from the online codecademy site or trying it on a python interpreter ?


#3

this is on the online codecademy side, and thank you kind sir for answering this thread!


#4

http://www.pythontutor.com/visualize.html#mode=edit

This is a link you may find useful in furthering your studies. Codecademy's interface can be frustrating at the best of times for a learner.


#6

I figured it out.... really... you have to write cobra with small letters... I am so sry I wasted your time.. :disappointed_relieved: