python how to delete a variable
del <Object name you want to delete>
python how to delete a variable
del <Object name you want to delete>
del all variables python
def a_func():
return 0
a_num = 5
print(dir())
>>> ['__builtins__', '__doc__', ..., 'a_func', 'a_num']
for element in dir():
if element[0:2] != "__":
del globals()[element]
del element
print(dir())
>>> ['__builtins__', '__doc__', ...]
delete variable python
f = 11;
print(f)
del f
print(f)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us