Which of the following syntaxes is used to define an empty dictionary in Python?

  • empty_dict = ()
  • empty_dict = []
  • empty_dict = {}
  • empty_dict = {}{}
The correct syntax to define an empty dictionary in Python is 'empty_dict = {}'. An empty dictionary consists of a pair of curly braces with nothing inside.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *