Find errors and rewrite the same after correcting the following code:
del d1(2)
In Python, to delete an element from a dictionary, we should use square brackets [], not parentheses ().
The corrected code is:
del d1[2]