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 Reverse a Number
Python vars()
Python Modules
Python List clear()
Python open()
Applied Text Analysis with Python - Benjamin Benfort & Rebecca Bibro & Tony Ojeda
Python enumerate()
Python String istitle()
Python max()
Python Generators
Python Program to Parse a String to a Float or Int
Python Function Arguments
Python Program to Count the Number of Digits Present In a Number
Python Directory and Files Management
Python List index()
Python Program to Capitalize the First Character of a String
Python strptime()
Python String capitalize()
Introduction to Scientific Programming with Python - Joakim Sundnes
Python Strings
Python Machine Learning - Sebastian Raschka
Python timestamp to datetime and vice-versa
Python bytes()
Python Program to Display Powers of 2 Using Anonymous Function
Python String lstrip()
Python String split()
Python Program to Differentiate Between type() and isinstance()
Python getattr()
Python chr()
Python Program to Get the Full Path of the Current Working Directory
Convert a Map to an Array, List or Set in Java
Python Program to Check If Two Strings are Anagram