Answer to Question #310865 in Python for Fe 2

Question #310865

Index of last occurrence




Input




245678245238



2

1
Expert's answer
2022-03-13T11:22:29-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS