0 votes
1 view
in Python by (47.8k points)

I want to build a dictionary in Python. However, all the examples that I see are instantiating a dictionary from a list, etc.

How do I create a new empty dictionary in Python?

1 Answer

0 votes
by (107k points)

For creating an empty dictionary you just need to call dict with no parameters

new_dict = dict()

or you have another choice which is a lot easier to write you just need to write as I have mentioned below:-

new_dict = {}

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !