Assignment 3
Assignment 3
Program: Co semester:6I
1) Define data structures in python and enlist different data structure in python
2) Explain list data structure following points
a) Declaring list b) accessing list elements using index number c) Iterating
through list using for loop d) use of len() in list e) slicing list
3) What is slicing in list explain with example
4) Explain basic operation on list a) append b) insert c) extend d) updating elements
in list
5) Explain del, remove , pop and clear function w.r.t list
6) Explain Following built in function w.r.t. list
a) Sort
b) Reverse
c) Index
d) Count
7) Explain multidimensional list with example
8) Difference between list and tuple . Explain why tuple are immutable ? How to declare
tuple
9) Explain basic operations of tuple a) Concatenation b) Multiplying tuple c) add()
d) deleting a tuple
10) What is dictionary data structure ? how to declare it? How to iterate through
dictionary using for loop?
11) Explain the use of Keys() and values() and get() ,items() , popitem() function in
dictionary with example
12) How to update elements in dictionary with the help of example
13) Explain set data structure w.r.t. following points
a) Declaring set
b) Iterating through set using for loop
c) Basic operation a) update b) add
d) Removing element discard()
14) Explain Following function w.r.t to set
a) Set union
b) Set intersection
c) Set difference
d) Set Symmetric _ difference
15) Explain issubset() ,issuperset() fuction w.r.t. set