In this python tuple program, we will check the type of the input and return True if the type is a tuple.
Steps to solve the program
- Take a tuple as input.
- Use an if-else statement and print True if the type is a tuple and False if it is not a tuple.
- Print the output.
tup = (7,4,9,2,0)
if type(tup) == tuple:
print("True")
else:
print("False")
Output :
True