CSE 136-Presentation
CSE 136-Presentation
Shreya Das
Student ID:203-15-14489
Section - B
DICTIONARY
Introduction:
In Python, a dictionary is a built-in data structure that stores a
collection of key-value pairs. Each key-value pair maps the key to its
associated value. Dictionaries are unordered, meaning there is no
guarantee of the order of the items stored within them.
del student["grade"]
student.pop("grade")
Advanced Dictionary Techniques
Dictionary Comprehension:
Dictionary comprehension is a concise and efficient way
to create dictionaries in Python.
numbers = [1, 2, 3, 4, 5]
square_dict = {num: num**2 for num in numbers}
print(square_dict)