CBSE · 083Class XII · 2024Section B1 mark

Question 23ai

2 April 2024 · Computer Science (083)

Write the Python statement for each of the following tasks using built-in functions/methods only :

(i) To remove the item whose key is "NISHA" from a dictionary named Students. For example, if the dictionary Students contains {"ANITA":90, "NISHA":76, "ASHA":92}, then after removal the dictionary should contain {"ANITA":90, "ASHA":92}.

Answer

python
Students.pop("NISHA")
# OR
del Students["NISHA"]