Last updated on August 9th, 2026 at 07:35 pm
Tuple in Python Class 11 Notes : Easy Notes for CBSE Students
Welcome to the complete Tuple in Python โ Class 11 Notes. A tuple is a close cousin of the list, but with one big difference โ it’s immutable, and that single fact drives almost every board question on this chapter. These notes cover the complete CBSE syllabus โ indexing, all tuple operations, every built-in function/method, tuple assignment, nested tuples, and the suggested programs โ with syntax, examples and outputs.
Quick Overview โ What You Will Learn
| # | Topic | Key Concepts | Exam Weight |
|---|---|---|---|
| 1 | Introduction to Tuples | Definition, creation, immutability | โญโญโญ |
| 2 | Tuple Indexing | Positive index, negative index | โญโญ |
| 3 | Tuple Operations | Concatenation, Repetition, Membership, Slicing | โญโญโญ |
| 4 | Built-in Functions/Methods | len(), tuple(), count(), index(), sorted(), min(), max(), sum() | โญโญโญ |
| 5 | Tuple Assignment | Packing, unpacking, swapping values | โญโญ |
| 6 | Nested Tuple | Tuple of tuples, double indexing | โญโญ |
| 7 | Suggested Programs | Min/Max/Mean, Linear Search, Frequency Count | โญโญโญ |
Section 1 ยท Introduction ยท โญโญโญ
๐ฆ What is a Tuple in Python?
A tuple is an ordered, immutable collection of items enclosed in round brackets
( ), with items separated by commas. Once created, its elements cannot be changed, added, or removed.
OrderedImmutableHeterogeneousAllows duplicates
print(subjects)
print(type(subjects))
<class ‘tuple’>
Single-Element Tuple โ the Most Common Mistake
A tuple with only one item needs a trailing comma โ without it, Python treats the brackets as normal parentheses, not a tuple!
not_a_tuple = (“apple”) # Wrong โ this is just a string
print(type(single_item))
print(type(not_a_tuple))
<class ‘str’>
(5,) not (5).Creating a Tuple โ 3 Ways
fruits = (“apple”, “banana”, “orange”)
# 2. Without any brackets at all (tuple packing)
point = 10, 20
print(type(point)) # still a tuple!
# 3. Using the tuple() constructor
numbers = tuple([1, 2, 3])
print(numbers)
(1, 2, 3)
Section 2 ยท Indexing ยท โญโญ
๐ข Tuple Indexing
Just like lists, every tuple element has a fixed position โ its index. Python supports positive indexing (0 onward) and negative indexing (-1 onward from the end).
| Element | red | blue | green |
|---|---|---|---|
| Positive Index | 0 | 1 | 2 |
| Negative Index | -3 | -2 | -1 |
print(colors[1]) # blue
print(colors[-1]) # green (last item)
print(colors[5]) # IndexError: tuple index out of range
colors[0] = "black" raises TypeError: 'tuple' object does not support item assignment.Section 3 ยท Tuple Operations ยท โญโญโญ
โ๏ธ Tuple Operations
CBSE syllabus defines four core tuple operations โ concatenation, repetition, membership and slicing โ the same four operations you learnt for lists and strings.
1. Concatenation ( + )
Joins two tuples into a new tuple. Since tuples are immutable, this always creates a brand-new tuple โ the originals stay untouched.
tuple2 = (3, 4)
result = tuple1 + tuple2
print(result)
2. Repetition ( * )
print(tuple1 * 3)
3. Membership ( in, not in )
print(“apple” in fruits)
print(“mango” not in fruits)
True
4. Slicing
Slicing extracts a portion of a tuple as a new tuple. Syntax:
tuple[start : stop : step]โ the stop index is never included.
print(colors[0:2]) # first two items
print(colors[2:]) # from index 2 to end
print(colors[::2]) # every 2nd item
print(colors[::-1]) # reversed tuple
(‘green’, ‘yellow’, ‘pink’)
(‘red’, ‘green’, ‘pink’)
(‘pink’, ‘yellow’, ‘green’, ‘blue’, ‘red’)
tuple[::-1] reverses any tuple โ just like it does for lists and strings.Section 4 ยท Built-in Functions/Methods ยท โญโญโญ
๐ ๏ธ Built-in Functions and Methods on Tuples
The CBSE syllabus lists exactly these functions/methods for tuples:
len(),tuple(),count(),index(),sorted(),min(),max(),sum(). Notice โ tuples do not haveappend(),remove(),sort(), orinsert(), because those would modify the tuple, and tuples are immutable!
len() and tuple()
print(len(my_tuple)) # 3
print(tuple(“CS”)) # string to tuple
print(tuple([1, 2, 3])) # list to tuple
(‘C’, ‘S’)
(1, 2, 3)
count() and index()
print(numbers.count(2)) # 3
print(numbers.index(3)) # 3 — first index found
3
sorted()
There is no
sort()method for tuples (that would change them in place). Use the built-in functionsorted()instead โ it returns a new sorted list, not a tuple!
print(sorted(marks))
print(type(sorted(marks)))
<class ‘list’>
sorted(tuple) always returns a list, never a tuple. If you need the result back as a tuple, wrap it again: tuple(sorted(marks)).min(), max() and sum()
print(min(marks))
print(max(marks))
print(sum(marks))
print(sum(marks) / len(marks)) # mean
92
355
88.75
๐ Complete Summary Table โ All CBSE Syllabus Tuple Methods
| Function/Method | What it Does | Returns |
|---|---|---|
len(tuple) | Number of elements | int |
tuple(seq) | Converts a sequence into a tuple | tuple |
count(x) | Counts occurrences of x | int |
index(x) | Index of first occurrence of x | int |
sorted(tuple) | Sorted elements (does NOT change the tuple) | list |
min(tuple) | Smallest element | element type |
max(tuple) | Largest element | element type |
sum(tuple) | Sum of numeric elements | int/float |
Section 5 ยท Tuple Assignment ยท โญโญ
๐ Tuple Assignment (Packing & Unpacking)
Tuple assignment lets you assign multiple variables in a single line. Packing groups values into a tuple; unpacking splits a tuple back into separate variables. The number of variables on the left must match the number of values on the right.
student = (“Amit”, 16, 88.5)
# Unpacking โ tuple values assigned to separate variables
name, age, marks = student
print(name)
print(age)
print(marks)
16
88.5
a = 5
b = 10
a, b = b, a
print(a, b)
a, b = b, a, and it works because Python packs the right side into a tuple first, then unpacks it.Section 6 ยท Nested Tuple ยท โญโญ
๐งฉ Nested Tuples
A nested tuple is a tuple inside another tuple โ useful for grouping related fixed records together, like coordinates or student records.
points = ((1, 2), (3, 4), (5, 6))
print(student[2]) # (78, 85, 92)
print(student[2][1]) # 85
print(points[1][0]) # 3
for pt in points:
print(pt)
85
3
(1, 2)
(3, 4)
(5, 6)
outer_tuple[i][j].Section 7 ยท Suggested Programs ยท โญโญโญ
๐ป Common Programs for CBSE Practicals & Board Exams
Program 1 โ Minimum, Maximum and Mean of a Tuple
minimum = min(numbers)
maximum = max(numbers)
mean = sum(numbers) / len(numbers)
print(“Minimum:”, minimum)
print(“Maximum:”, maximum)
print(“Mean:”, mean)
Without using built-in functions (common exam variant):
minimum = numbers[0]
maximum = numbers[0]
total = 0
for n in numbers:
if n < minimum:
minimum = n
if n > maximum:
maximum = n
total += n
mean = total / len(numbers)
print(“Minimum:”, minimum, ” Maximum:”, maximum, ” Mean:”, mean)
Program 2 โ Linear Search on a Tuple of Numbers
search_value = int(input(“Enter number to search: “))
found = False
for i in range(len(numbers)):
if numbers[i] == search_value:
print(“Found at index:”, i)
found = True
break
if not found:
print(“Value not found in the tuple”)
Program 3 โ Counting Frequency of Elements in a Tuple
freq = {}
for n in numbers:
if n in freq:
freq[n] += 1
else:
freq[n] = 1
for key, value in freq.items():
print(key, “occurs”, value, “time(s)”)
20 occurs 2 time(s)
30 occurs 1 time(s)
40 occurs 1 time(s)
numbers.count(10) gives its frequency in one line โ no loop needed.โ๏ธ Tuple vs List โ Quick Comparison
| Feature | Tuple | List |
|---|---|---|
| Brackets | ( ) | [ ] |
| Mutable? | No | Yes |
| Speed | Faster | Slower |
| Methods available | count(), index() | append(), remove(), sort(), insert() + more |
| Use case | Fixed data that shouldn’t change | Data that will grow, shrink, or change |
Frequently Asked Questions
Why are tuples faster than lists?
Because tuples are immutable, Python can store and access them more efficiently โ it doesn’t need to allow for resizing or in-place changes, so operations are quicker and use less memory.
How do you create a tuple with a single element?
Add a trailing comma after the value: (5,). Without the comma, (5) is treated as a plain integer, not a tuple.
Can you change an element of a tuple?
No. Tuples are immutable โ tuple[0] = "new value" raises a TypeError. To “change” a tuple, you must create a new one.
What does sorted() return when used on a tuple?
It returns a new list of the sorted elements โ not a tuple. Use tuple(sorted(t)) if you need a sorted tuple.
What is tuple unpacking?
Assigning the elements of a tuple to separate variables in one line, e.g. name, age = ("Amit", 16). The number of variables must match the number of values.
Why can’t tuples be sorted in place like lists?
Because sort() changes a list’s elements directly, and that kind of in-place modification is not allowed for an immutable tuple.
Quick Practice Links
๐ Tuple MCQs Class 11 | Python Compiler | ๐ Practical File | ๐ All Class 11 Notes
Explore More Class 11 CS Notes
๐ Python List | ๐ Python String | ๐ Python Dictionary | ๐ง Python Functions
Found an error or a missing example? Drop a comment below โ we fix issues quickly. If these notes helped you, share this page with your classmates!
