Checking for existence in Python Tuples
To check whether an item exists in a tuple use the in
keyword.
Example
Python
Copy Code
letters = ("A", "B", "C") if "A" in letters: print("'A' appears in the letters tuple")
To check whether an item exists in a tuple use the in
keyword.
letters = ("A", "B", "C") if "A" in letters: print("'A' appears in the letters tuple")