Learn Python Dictionaries - get(), items(), pop(), Comprehensions (Tutorial #10)

6views
00
9:26
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
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

Duration

9:26

Published

February 8, 2026

Added to Codegiz

March 15, 2026

๐Ÿ“– Read the articleOpen in YouTube