Please select all correct ways to empty the following dictionary
student = {
“name”: “Emma”,
“class”: 9,
“marks”: 75
}
-
del student`
-
del student[0:2]`
-
student.clear()`
Please select all correct ways to empty the following dictionary
student = {
“name”: “Emma”,
“class”: 9,
“marks”: 75
}
del student`
del student[0:2]`
student.clear()`
option 1 will delete the dictionary not empty it
option 2 involves slicing which is unsupported for dictionary
option 3 will empty the dictionary successfully