KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Consider the following statement and answer the question:

data = ("name": "Arjit", "age": 24)

This statement:

  1. Will create a dictionary
  2. Will create a tuple
  3. Will produce an error
  4. Will create a set

Getting Started

2 Likes

Answer

Will produce an error

Reason — A dictionary in Python must be defined using curly braces {} with key–value pairs separated by a colon. The given statement does not use curly braces, so it results in an error.

Answered By

1 Like


Related Questions