Table of Contents
1. Overview
The symmetric_difference_update() method finds the symmetric difference of two sets and updates the set calling it.
The symmetric difference of two sets A and B is the set of elements that are in either A or B, but not in their intersection.

The syntax of symmetric_difference_update() is:
A.symmetric_difference_update(B)
2. Return Value from symmetric_difference_update()
- The
symmetric_difference_update()returnsNone(returns nothing). Rather, it updates the set calling it.
3. Example: Working of symmetric_difference_update()
A = {'a', 'c', 'd'}
B = {'c', 'd', 'e' }
result = A.symmetric_difference_update(B)
print('A =', A)
print('B =', B)
print('result =', result)
Output
A = {'a', 'e'}
B = {'d', 'c', 'e'}
result = None
Here, the set A is updated with the symmetric difference of set A and B. However, the set B is unchanged.
Recommended Reading: Python Set symmetric_difference()
Related posts:
Python Program to Check if a Number is Positive, Negative or 0
Python Machine Learning Third Edition - Sebastian Raschka & Vahid Mirjalili
Python Set issubset()
Python all()
Python eval()
Python RegEx
Python exec()
Python Matrices and NumPy Arrays
Python 3 for Absolute Beginners - Tim Hall & J.P Stacey
Python iter()
Python Program to Check if a Key is Already Present in a Dictionary
Python List pop()
Deep Learning in Python - LazyProgrammer
Python String translate()
Python Program to Display Powers of 2 Using Anonymous Function
Python compile()
Python sum()
Python String isdecimal()
Python max()
Python Operator Overloading
Python Program to Compute the Power of a Number
Python Program to Extract Extension From the File Name
Python Program to Get File Creation and Modification Date
Python String format_map()
Python type()
Python Program to Sort Words in Alphabetic Order
Python Set remove()
Python Program to Calculate the Area of a Triangle
Python if...else Statement
Python Program to Get the Class Name of an Instance
Python Deeper Insights into Machine Learning - Sebastian Raschka & David Julian & John Hearty
Python Machine Learning Second Edition - Sebastian Raschka & Vahid Mirjalili