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:
Learning scikit-learn Machine Learning in Python - Raul Garreta & Guillermo Moncecchi
Python String isnumeric()
Python isinstance()
Python len()
Python List
Python Program to Find Sum of Natural Numbers Using Recursion
Python strftime()
Python frozenset()
Python Program to Split a List Into Evenly Sized Chunks
Python Decorators
Python Program to Add Two Numbers
Python Program to Find ASCII Value of Character
Python super()
Python List clear()
Python String startswith()
Node.js vs Python for Backend Development
Python float()
Python String encode()
Python Program to Find HCF or GCD
Python Program to Convert Decimal to Binary, Octal and Hexadecimal
Python exec()
Python Dictionary setdefault()
Python Machine Learning Second Edition - Sebastian Raschka & Vahid Mirjalili
Natural Language Processing with Python - Steven Bird & Ewan Klein & Edward Loper
Python Operators
Converting Between a List and a Set in Java
Python Set intersection()
Python Type Conversion and Type Casting
JavaScript Map and Set
Python String index()
Python Program to Add Two Matrices
Python time Module