मराठी

Assuming that D1 is a dictionary in Python. Write a single statement to delete all the elements from D1. - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Assuming that D1 is a dictionary in Python.

Write a single statement to delete all the elements from D1.

अति संक्षिप्त उत्तर
Advertisements

उत्तर

D1.clear()

This statement removes all items (key-value pairs) from the dictionary, leaving it empty.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2025-2026 (March) Set 4

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×