code: def first(sequence, message=None):
      
      try:
          return next(iter(sequence))
      except StopIteration:
          raise ValueError(message or ('Sequence is empty: %s' % sequence))
docs: The first item in that sequence
  
      If there aren't any, raise a ValueError with that message