Python program to Occurrences of i before first j in list
Given a list, the task is to write a Python program to count the occurrences of ith element before the first occurrence of jth element. Examples: Input : test_list = [4, 5, 6, 4, 1, 4, 8, 5, 4, 3, 4, 9], i, j = 4, 8 Output : 3 Explanation : 4 occurs 3 times before 8 occurs. Input : test_list = [4, 5