+2 votes
in Programming Languages by (73.2k points)
How to create an empty dictionary in Python?

1 Answer

+1 vote
by (346k points)
selected by
 
Best answer

In Python, a pair of braces creates an empty dictionary: {}.

E.g.

yourDict = {}

You can also use dict() constructor.

E.g.

yourDict1=dict()


...