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

Python Lab Assignmnet 01

Uploaded by

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

Python Lab Assignmnet 01

Uploaded by

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

School of Computer Engineering and Technology

B. Tech. (First Year)

Python Programming [ CSE10040]

ASSIGNMENT NO: 1

Problem Statement:
Different Operations on Dictionary and Tuple Data Structure.

Aim:
Write a python program to create, append and remove etc. operation on Dictionary and
Tuple.

Objectives:
To learn and implement Dictionary and Tuple Data Structure.

Theory:

1. Explain Lists in Python with the help of at least five methods.

2. Explain Tuples in Python with the help of at least five methods.

3. Explain Dictionaries in Python with the help of at least five methods.

Platform:
Windows/Ubuntu - Python Editor (Jupyter Notebook, IDLE, or any IDE).

Algorithm/Pseudo code:
Students should write algorithm/pseudo code for the given problem statement.

Input:
Dictionary, Tuple and List Data Structures and different operations on them.

Output:
1
Display different operations performed on Dictionary, Tuple and List Data Structures.

Conclusion:
Studied Python Dictionary, Tuple, and List Data Structures and implemented different
operations on them.

FAQs:
Q1. What will be the output of the following code snippet?
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(a[::2])

Q2. What will be the output of the following code snippet?


l = [1, 2, 3]
init_tuple = ('Python',) * (l.__len__() - l[::-1][0])
print(init_tuple)

Q3. State the difference between List, Tuple, and Dictionary.

Q4. What are the benefits of using Tuple assignment in Python?

You might also like