Del sth vs del(sth)

In Python, to delete a variable is

del sth

I am wondering why it is not like

del(sth)

del isn’t a function (it couldn’t be), so it has special syntax, just like import, global/nonlocal or if statements.

You can in fact write del(sth) if you want to, that is valid syntax, it has no runtime difference to del sth.

3 Likes