Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Python Fundamentals

Lesson 17 of 55 · Python

Data Structures – Dictionaries

Duration: 20 minutes

Data Structures – Dictionaries\n\nDictionaries map keys to values. They’re mutable, and as of Python 3.7 they preserve insertion order.\n\npython\nperson = {'name': 'Bob', 'age': 25}\nperson['city'] = 'New York'\nprint('Name:', person['name'])\n\n# Iterate over items\nfor key, value in person.items():\n print(key, ':', value)\n\n\nKeys must be hashable (e.g., strings, numbers, tuples). Values can be any object.\n

Previous: Data Structures – SetsNext: String Manipulation