Python Set update() method

Facebooktwitterredditpinterestlinkedinmailby feather

Python Set update() method

The set.update() method in Python updates the current set, by adding items from another set. If an element is common in both the sets, only one appearance of this item will be updated in the original set.

Syntax

Parameter

set- This parameter represents the main set.

set1- This argument signifies the other set to search for equal items.

Return

None

Example 1

Output

Example 2

Output

Facebooktwitterredditpinterestlinkedinmailby feather