School Revise · Class 11 Computer Science · Chapter 9
Code 083, Class 11. A list holds many values in order, and it can be changed. Here we create lists, read and change items, and use list methods.
|
|
A list stores several values in order, inside square brackets. Unlike a string, a list is mutable, so we can add, change and remove items.
Write a list in square brackets, separated by commas. Index it like a string: the first item is at 0. A slice reads part of the list.
|
nums = [10, 20, 30] print(nums[0], nums[-1]) Output: 10 30 |
Lists can change. append() adds to the end, insert() adds at a position, remove() deletes a value, and pop() removes by index.
len() counts items, sum() adds numbers, max() and min() find the largest and smallest, and sort() arranges the list. The word in checks membership.
Explore the idea by tapping. The interactive opens right here in the lesson.
Write and run real Python right here in the lesson, then work through the practice problems with answers.
Type each one into the code lab above, then open the card to see the worked solution and its output.
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
Square brackets, [ ].
append().
Yes, a list can be changed after it is made.
12.
|
A list stores several ordered values in square brackets and is mutable. Index it from 0, and slice it like a string. append() and insert() add items, remove() and pop() delete them. len(), sum(), max(), min() and sort() work on lists, and in checks membership. |
| Open the Virtual Lab |
These free Class 11 Computer Science notes explain lists, creating and indexing, list methods append insert remove and pop, and functions like sum max and sort with worked Python programs and practice, for CBSE students across India and the Gulf including the UAE, Saudi Arabia, Qatar, Oman, Kuwait and Bahrain.
© 2026 School Revise. All rights reserved. Original content aligned to the CBSE and NCERT Class 11 Computer Science syllabus. Unauthorised copying is not permitted.