code: def last(sequence, message=None):
      
      try:
          return sequence.pop()
      except AttributeError:
          return list(sequence).pop()
      except IndexError:
          raise ValueError(message or f'Sequence is empty: {sequence}')
docs: The last item in that sequence
  
      If there aren't any, raise a ValueError with that message