(self)
return self._array[self._top]
returns the current top element of the stack.
returns the current top element of the stack.
returns the current top element of the stack .
def peek(self):
        """returns the current top element of the stack."""
        if self.is_empty():
            raise IndexError("stack is empty")
        return self._array[self._top]
def peek ( self ) : if self . is_empty ( ) : raise IndexError ( "stack is empty" ) return self . _array [ self . _top ]