DEV Community

Onaolapo-11
Onaolapo-11

Posted on

I learnt about Dictionaries in Python

Day 72 [November 17, 2025]

I need to buckle down, as I'm still lagging on day day 3 & 4 goals, "Day 3-4: Control structures (if-else, loops)", as well as day 5 (and 6) goals, "Day 5-6: Functions and modules", and Day 7 target (exercises) (Meta AI, personal communication, August 8, 2025). If I haven't covered this, I can't make progress on day 8 - 71 goals.

Goals:
As extracted from the 'Python for Software Development' textbook by Halvorsen (n.d.):

  • Plotting in Python ✅
  • Subplots✅
  • Exercises✅
  • If ... Else
  • Arrays
  • For Loops
  • Nested
  • For Loops
  • While Loops
  • Exercises
  • Creating Functions in Python - Introduction
  • Functions with multiple return values
  • Exercises
  • Creating Classes in Python
  • The init () Function
  • Exercises
  • Creating Python Modules
  • Exercises

Notes:
Python for Data Science, AI & Development Course (IBM) (Santarcangelo, n.d.):
Module 2: Python Data Structures

  • Lists and Tuples
  • Dictionaries
  • Sets

The addition operator can be used to concatenate two lists, e.g.
[1,2,3] + [1,1,1]
outputs:
[1,2,3,1,1,1]

Dictionaries

  • Type of collection
  • Has keys (similar to index in lists) and values (similar to elements in lists)
  • keys are unchangeable and unique
  • values can be changeable, unchangeable, and copies
  • each key-value pair is separated by comma. Must dictionaries always have key-value pairs and why?
  • Keys can only be numbers strings, or any immutable object (like a tuple). On the therhand, values can be any data type. To every key there must be one and only one value
  • Dictionaries can be imagined as a table, with keys being the first column and values the second.
  • The keys of a dictionary can be retreived using keys() method, while values using the values() method Summary: I learnt about Dictionaries in Python.

References:

  1. Halvorsen, H. (n.d.). Python. https://halvorsen.blog/documents/programming/python/python.php#python4

  2. Santarcangelo, J. (n.d.). Python for data science, AI & development [MOOC]. Coursera. https://coursera.org/learn/python-for-applied-data-science-ai

I learnt about Dictionaries in Python.

Day 72 [November 17, 2025]

I need to buckle down, as I'm still lagging on day day 3 & 4 goals, "Day 3-4: Control structures (if-else, loops)", as well as day 5 (and 6) goals, "Day 5-6: Functions and modules", and Day 7 target (exercises) (Meta AI, personal communication, August 8, 2025). If I haven't covered this, I can't make progress on day 8 - 71 goals.

Goals:
As extracted from the 'Python for Software Development' textbook by Halvorsen (n.d.):

  • Plotting in Python ✅
  • Subplots✅
  • Exercises✅
  • If ... Else
  • Arrays
  • For Loops
  • Nested
  • For Loops
  • While Loops
  • Exercises
  • Creating Functions in Python - Introduction
  • Functions with multiple return values
  • Exercises
  • Creating Classes in Python
  • The init () Function
  • Exercises
  • Creating Python Modules
  • Exercises

Notes:
Python for Data Science, AI & Development Course (IBM) (Santarcangelo, n.d.):
Module 2: Python Data Structures

  • Lists and Tuples
  • Dictionaries
  • Sets

The addition operator can be used to concatenate two lists, e.g.
[1,2,3] + [1,1,1]
outputs:
[1,2,3,1,1,1]

Dictionaries

  • Type of collection
  • Has keys (similar to index in lists) and values (similar to elements in lists)
  • keys are unchangeable and unique
  • values can be changeable, unchangeable, and copies
  • each key-value pair is separated by comma. Must dictionaries always have key-value pairs and why?
  • Keys can only be numbers strings, or any immutable object (like a tuple). On the therhand, values can be any data type. To every key there must be one and only one value
  • Dictionaries can be imagined as a table, with keys being the first column and values the second.
  • The keys of a dictionary can be retreived using keys() method, while values using the values() method Summary: I learnt about Dictionaries in Python.

References:

  1. Halvorsen, H. (n.d.). Python. https://halvorsen.blog/documents/programming/python/python.php#python4

  2. Santarcangelo, J. (n.d.). Python for data science, AI & development [MOOC]. Coursera. https://coursera.org/learn/python-for-applied-data-science-ai

Top comments (0)