We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Python
  3. Sets
  4. Set .union() Operation
  5. Discussions

Set .union() Operation

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • dragielskirafal4
    1 year ago+ 0 comments
    n_english = int(input())
    zb_eng = set(map(int, input().split()))
    n_french = int(input())
    zb_fre = set(map(int, input().split()))
    
    a = zb_eng.union(zb_fre)
    print(len(a))
    
    4|
    Permalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature