On 29.03.2007, at 00:48, Larry Bates wrote: > [EMAIL PROTECTED] 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? >> >> Thank you. >> > > just point myDict to an empty dictionary again > > myDict={}
This is wrong and not answering the question. Creating a new dict does not change the dict. He wants to clear *this* dict, and maybe he cannot know how many other objects are referring to this dict. cheers -- chris ------------------------------------------------------------------ """pointless questions or useless answers - what do you like more""" -- http://mail.python.org/mailman/listinfo/python-list