code: def unique_justseen(iterable, key=None):
      
      return map(next, map(operator.itemgetter(1), groupby(iterable, key)))
docs: Yields elements in order, ignoring serial duplicates
  
          >>> list(unique_justseen('AAAABBBCCDAABBB'))
          ['A', 'B', 'C', 'D', 'A', 'B']
          >>> list(unique_justseen('ABBCcAD', str.lower))
          ['A', 'B', 'C', 'A', 'D']