It's also possible to remove elements by value, rather than by position, using the remove() method:
>>> u.remove('jackdaws')
>>> u
['love', 'my', 'sphinx', 'of', 'quartz']
This is equivalent to the more verbose:
>>> del u[u.index('jackdaws')]
Attempting to remove() an item which is not present will also cause a ValueError to be raised:
>>> u.remove('pyramid')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list