+ 3

help me guys

s={10,20,30} t={3,4} u=s.union_update(t) print (u)

4th Jul 2020, 7:00 AM
🥀Priya Singh🥀
🥀Priya Singh🥀 - avatar
3 Respostas
+ 1
a = {10,20,30} b = {3,4} a.update(b) print(a) Its a right way to union both the set
4th Jul 2020, 7:08 AM
Amaan
Amaan - avatar
+ 1
Instead of "u=s.union_update(t)" use: u = s.union(t)
4th Jul 2020, 1:15 PM
yyy
0
How about: print(a|b)
4th Jul 2020, 11:59 AM
Tomiwa Joseph
Tomiwa Joseph - avatar