Notice: Undefined offset: 1886682 in /var/www/html/qa-external/qa-external-users.php on line 744
how do you create an empty dictionary - OnlineGDB Q&A
Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do you create an empty dictionary

–3 votes
asked Mar 2, 2021 by Fadil Tai (100 points)

2 Answers

0 votes
answered Mar 13, 2021 by (10,560 points)
python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = {}          ---------->empty dict
>>> x               ---------->empty dict output below
{}
>>> x = {1:2,2:3}   ----------> non-empty dict
>>> x
{1: 2, 2: 3}
0 votes
answered Mar 15, 2021 by Peter Minarik (101,420 points)
What language are you after?
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...