Guest User

Untitled

a guest
Nov 17th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def union(*args):
  2.     result_set = set()
  3.     for current_set in args:
  4.         result_set |= current_set
  5.     return result_set
  6.  
  7.  
  8. if __name__ == '__main__':
  9.     print(union({1, 2, 3}, {10}, {2, 6}))
Advertisement
Add Comment
Please, Sign In to add comment