def arbitrary_element(iterable):
 if is_iterator(iterable):
  raise ValueError('cannot return an arbitrary item from an iterator')
 return next(iter(iterable))

def arbitrary_element ( iterable ) : if is_iterator ( iterable ) : raise ValueError ( 'cannot return an arbitrary item from an iterator' ) return next ( iter ( iterable ) )
returns an arbitrary element of iterable without removing it .