Unbinding multiple variables

John Machin sjmachin at lexicon.net
Thu Jan 20 23:00:17 EST 2005

Johnny Lin wrote:
> Hi!
> Is there a way to automate the unbinding of multiple variables?  Say
> 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