0% found this document useful (0 votes)
9 views7 pages

Class7 Chapter4

The document discusses various data types in Python, including lists, tuples, and sets, highlighting their characteristics and methods. It explains how to manipulate these data structures, such as adding, removing, and indexing elements. Additionally, it covers the differences between mutable and immutable types and provides examples for better understanding.

Uploaded by

vlewad78
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)
9 views7 pages

Class7 Chapter4

The document discusses various data types in Python, including lists, tuples, and sets, highlighting their characteristics and methods. It explains how to manipulate these data structures, such as adding, removing, and indexing elements. Additionally, it covers the differences between mutable and immutable types and provides examples for better understanding.

Uploaded by

vlewad78
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
You are on page 1/ 7

Date:

Page:-C"W
Ch Rython' t
Question Answen
What as4Q to n

Q9daed collec on tas.

1+ can contain mulkile data hyfes (staings loats


ond inteoeu etc)

) Tndexing in the t stoti om


hey coa be matiud
Tte ma olaced insi de Ahe Sauae
bíackst
Examplei ist C,2,3 hallo
ist = l#

Next ag
Hhe
elament
Jaatisindex
ae
at
clarnent
enta
elsm
the
Hem0ve
Mahematics
EnqhHaHhem,otics
Date:Page: e

a
English* ceas
to
thalpa he
]Computer
Compiex to
Hindi" (Maha)
aemave
Mylist to
hap
in
Specified index
spcitic hal
specified Hindi ()
MylistPap
O
Remove [' It
()
Pop
t
&
Example
-Mylist Exomple
= CleasO
Mylist
not

b)
d)
End
end
tho
Date:Page: English. t he
item
to
itarn
Computee single items
Hultiple
Add

o
Hindi
=Mylist Adda L2,3 LL23
=
Mylist
(leS()
list,
>My
-Exomple ()_
dAppen =
Mylist
lamp
Ex
e ExtendExample
wi)
How
Quss3
list
(a)
An D
Tt
obect
Length
etuns
Date:Page: 5]
sint
Extend
(4,5,6) L,2,3,4,
the (en
CHylist)
Pyhon
on
In
te
,2,3 toyind
clement
of
Numben
in =
Jitinaest Wed
Cmthod
used
ls
cammon
mylisf
Raint
the
numbesa(obËect)
þosition
Example aGyntaz eq>
Len
My
My Wht Ihe len
.Lists

Ansuse
p
=
t-aicta 6 2
values it(nn
osiginal
elemen
chasiactera
Date:Page:
elements
unique Pytaan
"))
tello - otement
Kes
(,2,z) =f2,34
set
My
elemen
ts 0
dict)) )) in
NumbeM
0 tuple)Aumbe1 (Hylst
enpaint
metho
huhlea
Hyeg (Hy (ty- Qsdan
(len
Ue )
Numhe
(len oictiononies
en NumbehRsiint eveme
he

striogai ( fae
hat he ies
mad
Tuples.Raint Laint
eveneA
Sets Lists
The
It

5Ques
Ans
3
EXTRA
Q0ES
Ans qie
tuple
a 0bracRet
doto
/ to
/
need
Date:Page:

collection
items
yae
datatype
dieesaernt you

s) examples ot
ele
meo
he
onchangeable.
The 23,4-5)elerments
(my inside
Qrdame
Tmmutobe
channoble)
Mylist uih nalue
empy
one
point t= create
to Hhe
C2,3,uy5)
Tples witen
duplicote
chaactesusticS ates
Syntar t=(\8)#
Define Exomple
i
Tuple
A
Allous
Allo

Ans 3
Qod
on iteorm
Sone Thechonged
at
is writen
It unordene
CammQS
/
Gixe pais
yalue
Key Aicionoy
hon.
&ach Set
Date:Page: hon?
py &
maRS
is
item9 in
memb
in that
py ite Hemove (chon
able)
q ematy Set
Sepsated
type Aata
in routabls alve
\
AnRu exomþle
Honay daBa
collechon
}#
as
a CUnchan
able) tems and
braces
Cuily
ade duplic
an colle
cion
k=Qist/name
immutable

dic isCictiona1y eStics;


chaoct
boo it
examplep be
Myhane
is Cankime Unasdere set USe
Examhle unindexed
ahat
youean Keys ClOss
Define canno
A
Set

ODes
Ans 3) Ans

You might also like