0% found this document useful (0 votes)
6 views2 pages

Class 11 List Manipulation Python Complete Notes

This document covers the basics of list manipulation in Python, including definitions, creation, accessing elements, slicing, and various operations. It also highlights important list methods and built-in functions, provides a sample program for calculating the average, and includes practice questions for further understanding. Key concepts include nested lists and common list operations like concatenation and membership.

Uploaded by

swarnimaggarwal8
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Class 11 List Manipulation Python Complete Notes

This document covers the basics of list manipulation in Python, including definitions, creation, accessing elements, slicing, and various operations. It also highlights important list methods and built-in functions, provides a sample program for calculating the average, and includes practice questions for further understanding. Key concepts include nested lists and common list operations like concatenation and membership.

Uploaded by

swarnimaggarwal8
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CLASS 11 COMPUTER SCIENCE

Chapter: List Manipulation (Python)

1. What is a List?

A list is a collection of elements enclosed in square brackets []. Lists are ordered, mutable, and
allow duplicate values.

2. Creating a List

marks = [80, 75, 90, 85]

3. Accessing Elements

marks[0] → 80

marks[-1] → 85

4. Slicing

marks[1:3] → [75, 90]

5. List Operations

Concatenation (+), Repetition (*), Membership (in, not in)

6. Important List Methods

append(), insert(), remove(), pop(), sort(), reverse(), count(), index()

7. Built-in Functions

len(), max(), min(), sum()

8. Sample Program: Find Average

nums = [10, 20, 30, 40]

avg = sum(nums)/len(nums)

print(avg)

Output: 25.0

9. Nested Lists

matrix = [[1,2,3],[4,5,6]]
matrix[1][2] → 6

10. Practice Questions

1. Find largest element in list

2. Remove duplicate values

3. Reverse a list without using reverse()

4. Count frequency of elements

5. Search an element in a list

You might also like