Simpan sebagai example8-11.py
Source Code
set1 = {"Budi", "Candra", "Malik"}
set2 = {90, 86, 79}
  
set3 = set1.union(set2)
print(set3)
Hasil Compile
C:\Users\PC Anda\Python>python example8-11.py
{'Budi', 'Candra', 'Malik', 86, 90, 79}