Answers for "def union(11 12) in python"

2

union of two sets python syntax

s1 = {'Python', 'Java'}
s2 = {'C#', 'Java'}

s = s1.union(s2)

print(s)
Posted by: Guest on January-03-2022
0

def union(11 12) in python

# Python program to illustrate union
# Without repetition 
def Union(11, 12):
    final_list = list(set(lst1) | set(lst2))
    return final_list
  
# Driver Code
lst1 = [23, 15, 2, 14, 14, 16, 20 ,52]
lst2 = [2, 48, 15, 12, 26, 32, 47, 54]
print(Union(lst1, lst2))
Posted by: Guest on April-07-2022

Python Answers by Framework

Browse Popular Code Answers by Language