finding the last occurrence of an item in a list python,last = len(s) - s[::-1].index(x) - 1