CBSE · 083Class XII · 2024Section A1 mark

Question 07

2 April 2024 · Computer Science (083)

Identify the invalid Python statement from the following :

Answer

(d) g = dict{}

Explanation

dict{} is invalid syntax because {} denotes a set or dict literal, while dict() is the constructor. It should be g = {} or g = dict().