How to I delete key from dictionary ?

Fredrik Lundh fredrik at pythonware.com
Fri Dec 5 16:42:21 CET 2003


fowlertrainer at anonym.hu wrote:

>   How to I delete key from dictionary ?
>
>   Like this:
>    d={1:'a'}
>    d.delete(1)
>    ????

del d[1]

more here:

http://www.python.org/doc/current/tut/node7.html#SECTION007400000000000000000

</F>








More information about the Python-list mailing list