Empty Dictionary in Python

Level 113 keystrokes

This creates and prints an empty dictionary using the dict() constructor.

Python code

# dict() called with no arguments creates a new, empty dictionary
# An empty dictionary is shown as {}, so {} is printed
1print(dict())

Output

{}
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Python code and how often they appear.

  • (× 2
  • )× 2

More Python examples at level 1

← Python typing practice