<jupyter_start><jupyter_text>All the IPython Notebooks in this lecture series by Dr. <NAME> are available @ **[GitHub](https://github.com/milaan9/02_Python_Datatypes/tree/main/006_Python_Sets_Methods)**  Python Set `intersection_update()`The **`intersection_update()`** updates the set calling **`intersection_update()`** method with the intersection of sets.The intersection of two or more sets is the set of elements which are common to all sets.To learn more, visit **[Python set Intersection()](https://github.com/milaan9/02_Python_Datatypes/blob/main/006_Python_Sets_Methods/008_Python_Set_intersection%28%29.ipynb)**.**Syntax**:```pythonA.intersection_update(*other_sets)```  `intersection_update()` ParametersThe **`intersection_update()`** method allows an arbitrary number of arguments (sets).>**Note:** __`*`__ is not part of the syntax. It is used to indicate that the method allows an arbitrary number of arguments.  Return Value from `intersection_update()`The **`intersection_update()`** method returns **`None`** (meaning it does not have a return value). It only updates the set calling the **`intersection_update()`** method.For example:```pythonresult = A.intersection_update(B, C)```When you run the code,* **`result`** will be **`None`*** **`A`** will be equal to the intersection of **`A`**,**`B`**, and **`C`*** **`B`** remains unchanged* **`C`** remains unchanged<jupyter_code># Example 1: How intersection_update() Works?

A = {1, 2, 3, 4}
B = {2, 3, 4, 5}

result = A.intersection_update(B)

print('result =', result)
print('A =', A)
print('B =', B)
# Example 2: intersection_update() with Two Parameters

A = {1, 2, 3, 4}
B = {2, 3, 4, 5, 6}
C = {4, 5, 6, 9, 10}

result = C.intersection_update(B, A)

print('result =', result)
print('C =', C)
print('B =', B)
print('A =', A)<jupyter_output>result = None
C = {4}
B = {2, 3, 4, 5, 6}
A = {1, 2, 3, 4}
{'fraction_non_alphanumeric': 0.17226666666666668, 'fraction_numerical': 0.0288, 'mean_word_length': 5.973977695167286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '439161', 'license': 'MIT', 'n_tokens_mistral': 683, 'n_tokens_neox': 620, 'n_words': 207, 'path': '006_Python_Sets_Methods/009_Python_Set_intersection_update().ipynb', 'repo_name': 'Maxc390/python-discrete-structures', 'size': '1881'}