how to Finding an item in a Tuple?
Home
/
how to Finding an item in a Tuple?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Verified answer
Ans:-✌️
•Find an element in tuple by value using 'in' & 'not in'
- Check if element 34 exists in tuple. -Check if element 1001 doesn't exists in tuple.
-Find the index of 34 in tuple, if not found then handle the exception.
- Find the index of 24 in tuple, if not found then handle the exception.
Answer:
Find an element in tuple by value using 'in' & 'not in'
# Check if element 34 exists in tuple. ...
# Check if element 1001 doesn't exists in tuple. ...
# Find the index of 34 in tuple, if not found then handle the exception. ...
# Find the index of 24 in tuple, if not found then handle the exception.