Prints union of arr1 [ 0. . n1 - 1 ] and arr2 [ 0. . n2 - 1 ]
def printUnion ( v , ans , zero ) : NEW_LINE INDENT zero1 = 0 ; NEW_LINE print ( " Union : " , end = "   " ) ; NEW_LINE for i in range ( v ) : NEW_LINE INDENT if ( ( zero == 0 and ans [ i ] == 0 ) or ( ans [ i ] == 0 and zero1 > 0 ) ) : NEW_LINE INDENT continue ; NEW_LINE DEDENT if ( ans [ i ] == 0 ) : NEW_LINE INDENT zero1 += 1 ; NEW_LINE DEDENT print ( ans [ i ] , end = " , " ) ; NEW_LINE DEDENT DEDENT