This is the instruction:
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.
And this is my code:
animals = [“aardvark”, “badger”, “duck”, “emu”, “fennec fox”]
duck_index = animals.index(“duck”)
duck_index =animals.insert(1, “duck”)
print animals # Observe what prints after the insert operation
but it seems not to be working
and this is the response am getting:
It looks like duck_index has the value None instead of animals.index(“duck”) .```python
Replace this line with your code.
<do not remove the three backticks above>