Set .union() Operation

  • + 5 comments

    Very nice! I combined your solution with my previous eval trick and managed to save another 7 characters:

    _,a,_,b=eval("set(input().split()),"*4);print(len(a|b))