<jupyter_start><jupyter_text>union<jupyter_code>from IPython.display import Image
Image("img/p2c6-union.png")
s1 = {5, 10, 15, 20, 25}
s2 = {20, 25, 30, 35}
s1 | s2
# s1.union(s2)<jupyter_output><empty_output><jupyter_text>difference<jupyter_code>s1 = {5, 10, 15, 20, 25}
s2 = {20, 25, 30, 35}
s1 & s2
from IPython.display import Image
Image("img/p2c6-intersection.png")<jupyter_output><empty_output><jupyter_text>difference<jupyter_code>s1 = {5, 10, 15, 20, 25}
s2 = {20, 25, 30, 35}
s1 - s2
from IPython.display import Image
Image("img/p2c6-difference.png")
# set symmetric difference
s1 = {5, 10, 15, 20, 25}
s2 = {20, 25, 30, 35}
s1 ^ s2
from IPython.display import Image
Image("img/p2c6-symmdiff.png")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16168478260869565, 'fraction_numerical': 0.12771739130434784, 'mean_word_length': 5.952830188679245, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '15195', 'license': 'MIT', 'n_tokens_mistral': 399, 'n_tokens_neox': 334, 'n_words': 74, 'path': '10. Python Set/4. Python Set Operations.ipynb', 'repo_name': 'penanrajput/PythonCourseContent', 'size': '736'}