Learn Python Dictionaries - get(), items(), pop(), Comprehensions (Tutorial #10)
6views
009:26
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn Python dictionaries in this beginner-friendly tutorial! ๐
In this lesson, you will learn:
โ
Creating dictionaries with curly braces
โ
Accessing values with brackets and get()
โ
Modifying: update, add, delete with del
โ
Dictionary methods: keys(), values(), items()
โ
update(), pop(), setdefault()
โ
Iterating over dictionaries
โ
Dictionary comprehensions
โ
Mini Project: Contact Book with nested dictionaries
๐ Timestamps:
0:00 - Introduction
0:22 - Dictionary Basics Explained
0:46 - Dictionary Basics Demo
2:48 - Dictionary Methods Explained
3:12 - Dictionary Methods Demo
5:04 - Mini Project Explained
5:28 - Contact Book Demo
8:23 - Recap
8:58 - End
๐ป Source Code: https://github.com/GoCelesteAI/python_dictionaries
๐ Code from this lesson:
# Dictionary Basics
person = {"name": "Alice", "age": 25}
print(person["name"])
print(person.get("email", "N/A"))
del person["city"]
# Dictionary Methods
for k, v in scores.items():
print(f"{k} scored {v}")
scores.update(new_scores)
removed = scores.pop("Charlie", 0)
squares = {x: x ** 2 for x in range(6)}
# Contact Book (nested dicts)
contacts[name] = {"phone": phone, "email": email}
for name, info in contacts.items():
print(f"{name}: {info['phone']}")
๐ Previous: Lesson 9 - Tuples & Sets
๐ Next: Lesson 11 - Functions
#Python #PythonTutorial #LearnPython #Programming #Dictionaries #PythonDict
Tags
Python, Python tutorial, Python for beginners, learn Python, Python dictionaries, dict, key-value pairs, get method, items method,
dictionary comprehension, nested dictionaries, contact book, CelesteAI
Back to tutorials๐ Read the articleOpen in YouTube
Duration
9:26
Published
February 8, 2026
Added to Codegiz
March 15, 2026