Python set symmetric_difference_update() Syntax

Syntax:  A.symmetric_difference_update(B) 
Parameters: 
The symmetric_difference takes a single ā€œiterableā€ as an argument. Iterable should contain hashable object.
Returns: 
This method returns None (which indicates absence of a return value). It only updates the set calling symmetric_difference_update() with the symmetric difference of sets.

Python set symmetric_difference_update()

The symmetric difference between the two sets is the set of elements that are in either of the sets but not in both of them.
 

Symmetric Difference is marked in Green

symmetric_difference() method returns a new set that contains a symmetric difference of two sets. The symmetric_difference_update() method updates the set by calling symmetric_difference_update() with the symmetric difference of sets.

Similar Reads

Python set symmetric_difference_update() Syntax

Syntax:Ā  A.symmetric_difference_update(B)Ā Parameters:Ā The symmetric_difference takes a single ā€œiterableā€ as an argument. Iterable should contain hashable object.Returns:Ā This method returns None (which indicates absence of a return value). It only updates the set calling symmetric_difference_update() with the symmetric difference of sets....

Python set symmetric_difference_update() Examples

Modifying Sets With Non-Duplicated Elements with Set symmetric_difference_update()...