"""

Python Sets [ 21 exercises with solution]
[An editor is available at the bottom of the page to write and execute the scripts.]

1. Write a Python program to create a set.


2. Write a Python program to iterate over sets.


3. Write a Python program to add member(s) in a set.


4. Write a Python program to remove item(s) from set


5. Write a Python program to remove an item from a set if it is present in the set.


6. Write a Python program to create an intersection of sets.


7. Write a Python program to create a union of sets.


8. Write a Python program to create set difference.


9. Write a Python program to create a symmetric difference.


10. Write a Python program to check if a set is a subset of another set.


11. Write a Python program to create a shallow copy of sets.

Note : Shallow copy is a bit-wise copy of an object. A new object is created that has an exact copy of the values in the original object.


12. Write a Python program to clear a set.


13. Write a Python program to use of frozensets.
Note: Frozensets behave just like sets except they are immutable.


14. Write a Python program to find maximum and the minimum value in a set.


15. Write a Python program to find the length of a set.


16. Write a Python program to check if a given value is present in a set or not.


17. Write a Python program to check if two given sets have no elements in common.


18. Write a Python program to check if a given set is superset of itself and superset of another given set.


19. Write a Python program to find the elements in a given set that are not in another set.


20. Write a Python program to check a given set has no elements in common with other given set.


21. Write a Python program to remove the intersection of a 2nd set from the 1st set.



"""
"""

Python Sets [ 21 exercises with solution]
[An editor is available at the bottom of the page to write and execute the scripts.]

1. Write a Python program to create a set.


2. Write a Python program to iterate over sets.


3. Write a Python program to add member(s) in a set.


4. Write a Python program to remove item(s) from set


5. Write a Python program to remove an item from a set if it is present in the set.


6. Write a Python program to create an intersection of sets.


7. Write a Python program to create a union of sets.


8. Write a Python program to create set difference.


9. Write a Python program to create a symmetric difference.


10. Write a Python program to check if a set is a subset of another set.


11. Write a Python program to create a shallow copy of sets.

Note : Shallow copy is a bit-wise copy of an object. A new object is created that has an exact copy of the values in the original object.


12. Write a Python program to clear a set.


13. Write a Python program to use of frozensets.
Note: Frozensets behave just like sets except they are immutable.


14. Write a Python program to find maximum and the minimum value in a set.


15. Write a Python program to find the length of a set.


16. Write a Python program to check if a given value is present in a set or not.


17. Write a Python program to check if two given sets have no elements in common.


18. Write a Python program to check if a given set is superset of itself and superset of another given set.


19. Write a Python program to find the elements in a given set that are not in another set.


20. Write a Python program to check a given set has no elements in common with other given set.


21. Write a Python program to remove the intersection of a 2nd set from the 1st set.



"""
Python Sets [ 21 exercises with solution] [An editor is available at the bottom of the page to write and execute the scripts.]  1. Write a Python program to create a set.   2. Write a Python program to iterate over sets.   3. Write a Python program to add member(s) in a set.   4. Write a Python program to remove item(s) from set   5. Write a Python program to remove an item from a set if it is present in the set.   6. Write a Python program to create an intersection of sets.   7. Write a Python program to create a union of sets.   8. Write a Python program to create set difference.   9. Write a Python program to create a symmetric difference.   10. Write a Python program to check if a set is a subset of another set.   11. Write a Python program to create a shallow copy of sets.  Note : Shallow copy is a bit-wise copy of an object. A new object is created that has an exact copy of the values in the original object.   12. Write a Python program to clear a set.   13. Write a Python program to use of frozensets. Note: Frozensets behave just like sets except they are immutable.   14. Write a Python program to find maximum and the minimum value in a set.   15. Write a Python program to find the length of a set.   16. Write a Python program to check if a given value is present in a set or not.   17. Write a Python program to check if two given sets have no elements in common.   18. Write a Python program to check if a given set is superset of itself and superset of another given set.   19. Write a Python program to find the elements in a given set that are not in another set.   20. Write a Python program to check a given set has no elements in common with other given set.   21. Write a Python program to remove the intersection of a 2nd set from the 1st set.