(B) Explain of List Following Operations
(B) Explain of List Following Operations
(B) Explain of List Following Operations
(a) What is Dictionary in Python? How is it different from List data type? Explain how (6. Marks)
forloop can be used to traverse the keysinofthe Dictionary
for the
with anexample with
(b)Explain code
the methods of List data type Python following operations
Q.3 suitable snippets for each.
ii) values from list (8 Marks
values to list
(i) Adding a Removing a
Inventory:
12 arrow
42 gold coin
I rope
6 torch
I dagger
Total number of items: 63
List any six methods associated with string and explain each of them with example.
(b)
Module -2
(a) What is list? Explain the concept ofslicing and indexing with proper examples.
For a given list num=[45,22,14,65,97,72], write a python program to replace all the
(b)
Q.3 integers divisible by 3 with "pPP" and all integers divisible by 5 with "qgg" and
replace all the integers divisible by both 3and 5 with "pppggg" and display the output.
What are the different methods supports in python List. Ilustrate all the methods with an
(C)example.
OR
(a)What is dictionary? 1llustrate with an example python program the usage of nested
dictionary.
List
(6) out allfortheeach
useful string
method.
methods which
supports in python. Explainwith an
Q.4 example
What are the different steps in project Adding Bullets to Wiki Markup.
(c)
Module -3
Q.5 (a) What are
regular expression? What are the different steps to be follow to use a regular
Texpression in python._