The question of 7 is:
Use the .index(item) function to find the index of "duck". Assign that result to a variable called duck_index.
Then .insert(index, item) the string "cobra" at that index.
The code you work with is:
animals = ["aardvark", "badger", "duck", "emu", "fennec fox"]
duck_index = # Use index() to find "duck"
Now, my solution:
duck_index = animals.index("duck")
The error I get:
Oops, try again. Did you forget to assign a value to duck_index?
Why do I get this error?