0
Is 'del' a function or a statement?
4 Answers
+ 3
In Python 'del' is a built-in function.
This operator stands for "delete." ...
With del, we specify a list, dictionary or other collection.
We pass an index or key we want to remove. ...
Del examples. Here we call del to remove the third element in a list. ...
Remove.
This method is available on lists. ...
Syntax. ...
Dictionary, del. ...
Performance. ...
String error.
+ 2
I think of it as more of a keyword. It is used as a prefix to DEFINE a function.
However, in the guts of the source of Python (or Ruby if you're talking about) it may be a function to define a function.
+ 2
Oh, I thought it said "def" not "del." šš
+ 2
ya me to at first which would have aligned with your answer @Jonathan