[EMAIL PROTECTED] a écrit :
> 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?

 >>> help(dict)
Help on class dict in module __builtin__:

class dict(object)
(...)
  |  Methods defined here:
(...)
  |
  |  clear(...)
  |      D.clear() -> None.  Remove all items from D.
(...)
 >>>
 >>> d = dict(a=1, b=2)
 >>> d
{'a': 1, 'b': 2}
 >>> d.clear()
 >>> d
{}
 >>>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to