On 16/10/2017 16:37, Xue Feng via Python-list wrote:
Hi,I wonder why 'del' is not a function or method. Most operations can be used as followslen(team) or team.append("tom") But, I think del team[2] is somewhat uncommon. Why does not it take a syntax we are famillar with?
It can look like a function
x = 3 del(x) xTraceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'x' is not defined
-- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list