Kent Johnson wrote:
> bob gailer wrote:
>> The del statement is the way to delete variables. Since dir() gives 
>> you their names one needs use eval.
>>
>> for varName in dir():
>>     eval 'del ' + varName
>
> I think del globals()[varName] would work.
Yep. That was nagging a corner of my brain, but not surfacing.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to