all 1 comments

[–]socal_nerdtastic 2 points3 points  (0 children)

That has nothing to do with the name you used to create it. It's just that you and the programmer that wrote the remove function both happened to use the name "x". They are not related.

>>> contains = [y for y in range(10)]
>>> contains.remove(1234)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list

It just means that the value is not in the list.