Python Lab Manual / Python tuples Program

Program Name

Write a Python tuples Program.
Theory
Python Tuples are used to store multiple items separated by commas in a single variable. 
Program Code


Input and Output:

Output:

Tuple Assignment 
(10, 40, 'wisdom')

Creating non-empty tuples
('wisdom', 'materials')

Creating non-empty tuples
('wisdom', 'materials')

concatenating 2 tuples 
(0, 1, 2, 3, 'wisdom', 'materials')

creating nested tuples
((0, 1, 2, 3), ('python', 'Language'))


Home     Back