Skip to content

Instantly share code, notes, and snippets.

@vortec
Created October 17, 2013 15:40
Show Gist options
  • Select an option

  • Save vortec/7027204 to your computer and use it in GitHub Desktop.

Select an option

Save vortec/7027204 to your computer and use it in GitHub Desktop.
>>> x = {1, 2, 3}
>>> y = [3, 4, 5]
>>> x.intersection(y)
{3}
>>> x & y
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for &: 'set' and 'list'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment