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

? Assignment - Python Data Structures

The document outlines an assignment focused on Python data structures, including lists, tuples, sets, and dictionaries. It contains specific questions and tasks for each data structure, such as finding the largest number in a list, converting a tuple to a list, and counting character frequency in a string using a dictionary. Each section provides practical exercises to enhance understanding of these fundamental programming concepts.

Uploaded by

Tushar Jain
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)
2 views2 pages

? Assignment - Python Data Structures

The document outlines an assignment focused on Python data structures, including lists, tuples, sets, and dictionaries. It contains specific questions and tasks for each data structure, such as finding the largest number in a list, converting a tuple to a list, and counting character frequency in a string using a dictionary. Each section provides practical exercises to enhance understanding of these fundamental programming concepts.

Uploaded by

Tushar Jain
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

📘 Assignment: Python Data Structures

🔹 List Questions
1.​ Create a list of 5 numbers and print the largest number.​

2.​ Write a program to add an element at the end of a list.​

3.​ Remove a specific item from a list entered by the user.​

4.​ Count how many times a number appears in a list.​

🔹 Tuple Questions
5.​ Create a tuple with 5 elements and print the first and last element.​

6.​ Convert a tuple into a list.​

7.​ Check whether an element exists in a tuple or not.​

🔹 Set Questions
8.​ Create a set and add three elements to it.​

9.​ Find common elements between two sets.​

10.​Remove duplicate values from a list using a set.​

11.​Check if one set is subset of another.​


🔹 Dictionary Questions
12.​Create a dictionary with student name and marks, then print all keys.​

13.​Update value of a specific key in a dictionary.​

14.​Count frequency of characters in a string using dictionary.​

15.​Merge two dictionaries into one.

You might also like