Robotics & Artificial Intelligence
To define a dictionary in Python, which bracket is used?
- Curly{}
- Square[]
- Small()
- None of these
Getting Started
2 Likes
Answer
Curly{}
Reason — In Python, a dictionary is enclosed in curly braces {} and stores data in the form of key-value pairs.
Answered By
2 Likes
Related Questions
The NumPy library in Python is mainly used for:
- Machine learning
- Plotting
- Mathematical operations and data analysis
- Developing games
Which of the following is/ are the features of Python?
- Object-oriented
- High-level
- General-purpose
- All of these
Consider the following statement and answer the question:
data = ("name": "Arjit", "age": 24)This statement:
- Will create a dictionary
- Will create a tuple
- Will produce an error
- Will create a set
Which out of the following is a valid variable name?
- @val
- 9val
- _val
- int