Mike Driscoll
Mike Driscoll

@driscollis

4 Tweets Jan 28, 2023
Let's talk about creating dictionaries with #Python ๐Ÿ
A dictionary is a key / value pair. The key must be of an immutable type, such as an integer or a string. The value can be of any type
๐Ÿงต๐Ÿ‘‡
You can create a #Python dictionary in several different ways.
The following shows the most common method of dictionary creation followed by using a dictionary comprehension
You can also create a #Python dictionary by using the `dict()` function
There are two ways to create an empty dictionary in #Python
Here's how:

Loading suggestions...