Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to combine sets using union() function

mySet = {1, 2, 3, 4}
mySet2 = {3, 4, 5, 6}
mySet3 = mySet.union(mySet2)
print(mySet3)

# Output:
# {1, 2, 3, 4, 5, 6}
Source by liu-111.medium.com #
 
PREVIOUS NEXT
Tagged: #combine #sets #function
ADD COMMENT
Topic
Name
6+9 =