Test Index

Python Revision Tour Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 56 of 102
Marks: +1, -0
Identify the invalid Python statement from the following :
[CBSE 2024 Set 4]
Solution:  
Concept:
An empty dictionary is created with {} or with the function call dict(). A function is always called with round brackets.
Explanation:
d = dict(): empty dictionary, valid.
e = {}: empty dictionary, valid.
f = []: empty list, valid.
g = dict{}: curly brackets after a function name is a SyntaxError.
Answer:
Option D (g = dict{})
© examsnet.com
Advertisements
Go to Question: