code: def intersection (set1, set2):
      
      assert is_iterable(set1)
      assert is_iterable(set2)
      result = []
      for v in set1:
          if v in set2:
              result.append (v)
      return result
docs: Removes from set1 any items which don't appear in set2 and returns the result.