Prints union of arr1 [ 0. . n1 - 1 ] and arr2 [ 0. . n2 - 1 ]
def printUnion ( arr1 , arr2 , n1 , n2 ) : NEW_LINE INDENT hs = set ( ) NEW_LINE for i in range ( 0 , n1 ) : NEW_LINE INDENT hs . add ( arr1 [ i ] ) NEW_LINE DEDENT for i in range ( 0 , n2 ) : NEW_LINE INDENT hs . add ( arr2 [ i ] ) NEW_LINE DEDENT print ( " Union : " ) NEW_LINE for i in hs : NEW_LINE INDENT print ( i , end = " ▁ " ) NEW_LINE DEDENT print ( " " ) NEW_LINE DEDENT