+ 2
How to delete a function
Is it possible to delete a function? If yes, How? and Why will someone want to delete it?
3 Antworten
+ 10
def f() :
print(l)
del(f)
It is necessary to free memory.
+ 6
Yes it is possible....
refer to this resource at stackoverflow:
https://stackoverflow.com/questions/22675968/how-delete-functions-on-JUMP_LINK__&&__python__&&__JUMP_LINK
as to why
because in a multiple cycle run rather a loop of sorting or a while we may not need certain functions or files to run over and over so you delete them which inturn may also speed up processing in a batch...
+ 1
Yes it is possible ... as first you define the function and then print that and it is necessary to free the memory and for this we use del().
for example :
def function name():
print(l)
del(function name)