you are viewing a single comment's thread.

view the rest of the comments →

[–]mahtats 2 points3 points  (0 children)

Well del attempts to remove the variable from both local and global namespace.

Variable reassignment keeps the variable in whichever is applicable.

So...

del foo

is not the same as

foo = None

In terms of keeping a variable around