Question #310865

Index of last occurrence




Input




245678245238



2

Expert's answer

a = [int(i) for i in input("Enter list of numbers: ").split()]
b = int(input("Search number: "))
index = 0
for i in range(len(a)):
    if a[i] == b:
        index = i
print("Index of Last Occurrence: ", index)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS