List PPT CH 11 As On Sunday 18th
List PPT CH 11 As On Sunday 18th
List PPT CH 11 As On Sunday 18th
XI
N.GEETHA MSc(IT),BE.d.,
Subject: Computer
Topic : Python
Program
Std : XII-A
Find out
Clue for today’s Topic
CHAPTER – 5
file MANIPULATION
in Python
file Manipulation
Lists
Creating Lists.
Types of Lists.
Methods in Lists.
Operators in Lists.
Example program using Lists.
file Manipulation
Creating and accessing Lists
You can create a list by enclosing a comma-
separated sequence of items within square
brackets [ ].
Lists can contain elements of different data
types.
index()
append()
insert()
extend()
remove()
pop()
clear()
reverse()
len():Returns the number of items in the list
index( ):You can get the Index value of an
element
Accessing index value in
Lists
• Elements of list can be accessed using index same as strings i.e.,
forward indexing as 0,1,2,3…. and backward indexing as -1,-2,-3,…