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 for Loop
Python String zfill()
Python Program to Check If a List is Empty
Python String islower()
Python Program to Find the Sum of Natural Numbers
Python Program to Display Calendar
Statistical Methods for Machine Learning - Disconver how to Transform data into Knowledge with Pytho...
Python Machine Learning Eqution Reference - Sebastian Raschka
Python Program to Extract Extension From the File Name
Python frozenset()
Python String maketrans()
Python Get Current time
Python object()
Python strftime()
Python Program to Check Armstrong Number
Python String center()
Python Program to Print Colored Text to the Terminal
Python Tuple count()
Python String count()
Python Inheritance
Python Program to Create a Long Multiline String
Machine Learning Applications Using Python - Cases studies form Healthcare, Retail, and Finance - Pu...
Python Set issubset()
Python Program to Find ASCII Value of Character
Python divmod()
Python Program to Display Powers of 2 Using Anonymous Function
Python Keywords and Identifiers
Python Statement, Indentation and Comments
Python zip()
Python Program to Split a List Into Evenly Sized Chunks
Python Variables, Constants and Literals
Python String rsplit()