In [1]:
s = set()
s, type(s)


Out[1]:
(set(), set)

In [2]:
s = {2, 3, 5, 7}
s, type(s)


Out[2]:
({2, 3, 5, 7}, set)

In [3]:
s = {}
s, type(s)


Out[3]:
({}, dict)

In [4]:
s = {,}
s, type(s)


  File "<ipython-input-4-a395a77feb02>", line 1
    s = {,}
         ^
SyntaxError: invalid syntax

In [5]:
s = set()
s, type(s)


Out[5]:
(set(), set)

In [6]:
2 in s


Out[6]:
False

In [7]:
s |= 2


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-fdf6d48f382e> in <module>()
----> 1 s |= 2

TypeError: unsupported operand type(s) for |=: 'set' and 'int'

In [8]:
s |= {2}
s, type(s)


Out[8]:
({2}, set)

In [9]:
s |= {3}
s, type(s)


Out[9]:
({2, 3}, set)

In [10]:
s.remove(3)
s


Out[10]:
{2}

In [11]:
t = {i:i*i for i in range(5)}
t


Out[11]:
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16}

In [12]:
t.pop(2)


Out[12]:
4

In [13]:
t


Out[13]:
{0: 0, 1: 1, 3: 9, 4: 16}

In [14]:
t.pop(2)


---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-14-bc132d9fb9e8> in <module>()
----> 1 t.pop(2)

KeyError: 2