https://docs.vultr.com/python/standard-library/dict/clear

 

python dict clear In Python, you can use the .clear() method to remove all items from a dictionary. Here’s an example:
# Creating a dictionary
student = {“name”: “Alice”, “age”: 20, “marks”: 85}

# Clearing the dictionary

istockphoto-629285904-612x612.jpg