This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- table | |
-- name number | |
-- 1 10 | |
-- 2 20 | |
-- 3 10 | |
-- 4 30 | |
-- ... | |
-- result | |
-- name amount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dont_clean = [ 'initial_vars' ] | |
def cleanup(): | |
print dont_clean | |
vars_to_free = [ k for k in set( globals().copy() ).difference( initial_vars.union( set( dont_clean ) ) ) ] | |
print vars_to_free, | |
for c in vars_to_free: | |
del globals()[ c ] | |
print "cleaned" |
NewerOlder