Python Set add() Method

Python Set add() Method

  • The set add() method adds a given element to a set if the element is not present in the set. 

Syntax

  • set.add(element)

Parameter Values

  • element - the element that is added to the set

 

 

Comments