Find the last index where a value appears in a list, or return -1.
Constraints
Example
>>> last_occurrence([1, 2, 3, 2, 1], 2) 3 >>> last_occurrence([]) -1 >>> last_occurrence([5, 6, 5], 5) 2
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints