how can I clear a dictionary in python

Christian Tismer tismer at stackless.com
Wed Mar 28 18:47:53 EDT 2007


On 29.03.2007, at 00:38, Marko.Cain.23 at gmail.com wrote:

> Hi,
>
> I create a dictionary like this
> myDict = {}
>
> and I add entry like this:
> myDict['a'] = 1
> but how can I empty the whole dictionary?

Reading the Python docs might help.
But before, I would try a dir(myDict).
Maybe you will find an easter-egg
which has exactly the name you are looking for?

cheers - chris




More information about the Python-list mailing list