Question #6565   Submitted by Answiki on 09/04/2022 at 05:31:06 PM UTC

How to create an empty dictionary in Python ?

Answer   Submitted by Answiki on 09/04/2022 at 05:32:07 PM UTC

In Python, the following code creates an empty dictionary:

myDict = {}

An alternative is to call the dict() function: 

myDict = dict()


2 events in history
Answer by Answiki on 09/04/2022 at 05:32:07 PM

In Python, the following code creates an empty dictionary:

myDict = {}

An alternative is to call the dict() function: 

myDict = dict()


Question by Answiki 09/04/2022 at 05:31:06 PM
How to create an empty dictionary in Python ?
# ID Query URL Count

Icons proudly provided by Friconix.