"del" command | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

"del" command

Using "del" on a variable, it deletes the variable itself or it deletes the content of the variable leaving it blank but still with the entity of the variable registered in programm memory?

17th Feb 2017, 2:46 PM
Maria204
Maria204 - avatar
3 Answers
+ 2
Actually, that does not delete the variable/property. All it will do is set its value to None, therefore the variable will still take up space in memory.
17th Feb 2017, 3:33 PM
Darko Churdy
+ 1
it deletes ONE reference to the value of that variable, so you can't use it using the name you deleted
17th Feb 2017, 3:55 PM
Amaras A
Amaras A - avatar
+ 1
Darko Churdy and Amaras A thank you both for your answers and your help!!!
17th Feb 2017, 11:05 PM
Maria204
Maria204 - avatar