Python Exercise: Create a tuple with numbers, and display a member
Python tuple: Exercise-3 with Solution
Write a Python program to create a tuple with numbers and print one item.
>>> #Create a tuple with numbers >>> tuplex = 5, 10, 15, 20, 25 >>> print(tuplex) >>> #Create a tuple of one item >>> tuplex = 5, >>> print(tuplex)
(5, 10, 15, 20, 25) (5,)
Python Code Editor:
Improve this sample solution and post your code through Disqus