Unbinding multiple variables

John Machin sjmachin at lexicon.net
Fri Jan 21 05:00:17 CET 2005


Johnny Lin wrote:
> Hi!
>
> Is there a way to automate the unbinding of multiple variables?  Say
I
> have a list of the names of all variables in the current scope via
> dir().  Is there a command using del or something like that that will
> iterate the list and unbind each of the variables?
Yes. It's called "return".




More information about the Python-list mailing list