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 Print Hello world!
Python frozenset()
Python Program to Count the Number of Digits Present In a Number
Python Function Arguments
Python reversed()
Python if...else Statement
Python Modules
Python Program to Find HCF or GCD
Python setattr()
Python time Module
Python Program to Check Whether a String is Palindrome or Not
Python iter()
Python Operator Overloading
Python Program to Check If a String Is a Number (Float)
Java Program to Implement Dijkstra’s Algorithm using Set
Python Program to Get the Last Element of the List
Python Program to Check If Two Strings are Anagram
Python help()
Python Program to Capitalize the First Character of a String
Python Dictionary copy()
Python List copy()
Python Program to Find Armstrong Number in an Interval
Python String isprintable()
Python format()
Python String maketrans()
Python Program to Differentiate Between type() and isinstance()
Python sorted()
Python Program to Get the Full Path of the Current Working Directory
Python String title()
How to get current date and time in Python?
Python Program to Find the Factorial of a Number
Python List append()