>>> num = {1,2,3}
>>> type(num)
<class 'set'>
>>> num2 = {1,2,3,4,5,5,4,2,1}
>>> num2
{1, 2, 3, 4, 5}
set()
>>> set1 = set([1,2,3])
>>> set1
{1, 2, 3}
>>> num1 = [1,2,3,4,5,5,3,1,0]
>>> temp = []
>>> for each in num1:
if each not in temp:
temp.append(each)
>>> temp
[1, 2, 3, 4, 5, 0]
>>> num1 = list(set(num1))
>>> num1
[0, 1, 2, 3, 4, 5]
>>> num2
{1, 2, 3, 4, 5}
>>> 1 in num2
True
>>> "1" in num2
False
>>> num2.add(6)
>>> num2
{1, 2, 3, 4, 5, 6}
>>> num2.remove(5)
>>> num2
{1, 2, 3, 4, 6}
frozen.set()
>>> num3 = frozenset([1,2,3,4,5])
>>> num3.add(6)
Traceback (most recent call last):
File "<pyshell#43>", line 1, in <module>
num3.add(6)
AttributeError: 'frozenset' object has no attribute 'add'