w3resource logo
Python Exercises

Python Exercise: Create a tuple with different data types

Python tuple: Exercise-2 with Solution

Write a Python program to create a tuple with different data types.

Sample Solution:-

Python Code:

>>> #Create a tuple with different data types
>>> tuplex = ("tuple", False, 3.2, 1)
>>> print(tuplex)

Sample Output:

('tuple', False, 3.2, 1) 

Python Code Editor:

#Create a tuple with different data types
tuplex = ("tuple", False, 3.2, 1)
print(tuplex)

Improve this sample solution and post your code through Disqus