Write a python program in a tuple without using index() that finds an element index/position
Answers
Answered by
21
Answer:
thistuple = ("apple", "banana", "cherry")
print(thistuple)
print("Enter element name")
search=input()
counter=0
for x in thistuple:
if x==search: print(search+" is found at postion "+ str(counter))
index=index+1
Explanation:
Similar questions
English,
5 months ago
English,
5 months ago
English,
5 months ago
CBSE BOARD XII,
11 months ago
Math,
11 months ago
Business Studies,
1 year ago
Math,
1 year ago