basket = { 'basket', 'orange', 'pear', 'orange' , 'ata' }

print(type(basket))

# Duplication removed
print(basket) # {'pear', 'basket', 'orange'}
print('orange' in basket) # True
print('cannabis' in basket) # False

print(basket)

poped_data = basket.pop() # pop takes data from 1st index in case of set
print([1, 2].pop()) # pop takes last element from list in case of array/list

poped_data_char_set = set(poped_data )

print(poped_data)

# duplicates removed
print(poped_data_char_set) # {'a', 't'}

a = set('123')
b = set('234')

# set minus
print(a - b)# {'1'}

# union
print(a | b) # {'1', '3', '4', '2'}

# intersection
print(a & b) # {'2', '3'}

# letters in a or b but not in both
# sql: full join (a.id is null or b.id is null)
print(a ^ b)

# list comprehension
print({ x for x in a if x not in '39' })# {'1', '2'}



96cc0bf4705cf59cd5a42adcd08285141123f688
<mask token>

<mask token>
print(type(basket))
print(basket)
print('orange' in basket)
print('cannabis' in basket)
print(basket)
<mask token>
print([1, 2].pop())
<mask token>
print(poped_data)
print(poped_data_char_set)
<mask token>
print(a - b)
print(a | b)
print(a & b)
print(a ^ b)
print({x for x in a if x not in '39'})

basket = {'basket', 'orange', 'pear', 'orange', 'ata'}
print(type(basket))
print(basket)
print('orange' in basket)
print('cannabis' in basket)
print(basket)
poped_data = basket.pop()
print([1, 2].pop())
poped_data_char_set = set(poped_data)
print(poped_data)
print(poped_data_char_set)
a = set('123')
b = set('234')
print(a - b)
print(a | b)
print(a & b)
print(a ^ b)
print({x for x in a if x not in '39'})

basket = { 'basket', 'orange', 'pear', 'orange' , 'ata' }

print(type(basket))

# Duplication removed
print(basket) # {'pear', 'basket', 'orange'}
print('orange' in basket) # True
print('cannabis' in basket) # False

print(basket)

poped_data = basket.pop() # pop takes data from 1st index in case of set
print([1, 2].pop()) # pop takes last element from list in case of array/list

poped_data_char_set = set(poped_data )

print(poped_data)

# duplicates removed
print(poped_data_char_set) # {'a', 't'}

a = set('123')
b = set('234')

# set minus
print(a - b)# {'1'}

# union
print(a | b) # {'1', '3', '4', '2'}

# intersection
print(a & b) # {'2', '3'}

# letters in a or b but not in both
# sql: full join (a.id is null or b.id is null)
print(a ^ b)

# list comprehension
print({ x for x in a if x not in '39' })# {'1', '2'}


