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 property()
Python any()
Machine Learning Mastery with Python - Understand your data, create accurate models and work project...
Python Program to Convert String to Datetime
Python Program to Remove Duplicate Element From a List
Python String center()
Python String endswith()
Python filter()
Machine Learning with Python for everyone - Mark E.Fenner
Python String lstrip()
Python Set difference_update()
Python hex()
Python exec()
Python setattr()
Python String lower()
Python Program to Split a List Into Evenly Sized Chunks
Java Program to Implement the Binary Counting Method to Generate Subsets of a Set
Python Program to Check the File Size
Python Program to Display Powers of 2 Using Anonymous Function
Python RegEx
Python Program to Merge Mails
Python Directory and Files Management
Python max()
Python Program to Check If a List is Empty
Python help()
Python Dictionary fromkeys()
Python sleep()
Python classmethod()
Python hasattr()
Python Program to Count the Number of Occurrence of a Character in String
Introduction to Machine Learning with Python - Andreas C.Muller & Sarah Guido
Python Program to Convert Decimal to Binary Using Recursion