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 String isspace()
Python String rfind()
Python Program to Print Hello world!
Python Set update()
Python String isidentifier()
Python if...else Statement
Python Tuple index()
Python vars()
Python String istitle()
Intelligent Projects Using Python - Santanu Pattanayak
Python Function Arguments
Python int()
Python RegEx
Python String count()
Python Data Analytics with Pandas, NumPy and Matplotlib - Fabio Nelli
Python Program to Compute the Power of a Number
Python String isdigit()
Python List
Python oct()
Python String encode()
Python Program to Display Powers of 2 Using Anonymous Function
Python String startswith()
Python next()
Python Program to Reverse a Number
Python Program to Illustrate Different Set Operations
Python sum()
Converting Between an Array and a Set in Java
Introduction to Machine Learning with Python - Andreas C.Muller & Sarah Guido
Python Object Oriented Programming
Python Program to Create a Long Multiline String
Python Program to Return Multiple Values From a Function
Natural Language Processing with Python - Steven Bird & Ewan Klein & Edward Loper