Python: Basic: Second Negative

Write the function second_negative that takes a list of numbers and returns the position (index) of the second negative number inside the list. If there is no second negative number, the function should return -1. Note that in Python, the position of elements inside a list starts from zero.


second_negative([1, 5, -3, 2, -10, -20]) -> 4
second_negative([-5, 1, 2, 8, 10, 10]) -> -1

Test 1    

Test 2    

Test 3    

Test 4