[' '' '' '' '' '' 'to test more thoroughlythe following codes function to apply the two tools to arguments in different orders using simple shuffling technique that we saw in --it slices to move the first to the end on each loopuses to unpack argumentsand sorts so results are comparabledef tester(funcitemstrace=true)for in range(len(items))items items[ :items[: if traceprint(itemsprint(sorted(func(*items))tester(intersect(' ''abcdefg''abdst''albmcnd')('abcdefg''abdst''albmcnd'' '[' '('abdst''albmcnd'' ''abcdefg'[' '('albmcnd'' ''abcdefg''abdst'[' '(' ''abcdefg''abdst''albmcnd'[' 'tester(union(' ''abcdefg''abdst''albmcnd')false[' '' '' '' '' '' '' '' '' '' '' '' '[' '' '' '' '' '' '' '' '' '' '' '' '[' '' '' '' '' '' '' '' '' '' '' '' '[' '' '' '' '' '' '' '' '' '' '' '' 'tester(intersect('ba''abcdefg''abdst''albmcnd')false[' '' '[' '' '[' '' '[' '' 'the argument scrambling here doesn' generate all possible argument orders (that would require full permutationand orderings for arguments)but suffices to check if argument order impacts results here if you test these furtheryou'll notice that duplicates won' appear in either intersection or union resultswhich qualify them as set operations from mathematical perspectiveintersect([ ]( )[ union([ ]( )[ tester(intersect('ababa''abcdefga''aaaab')false[' '' '[' '' '[' '' 'these are still far from optimal from an algorithmic perspectivebut due to the following notewe'll leave further improvements to this code as suggested exercise also arguments