Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/geekcomputers/Python
/ peek
Function
peek
stackF_Harsh2255.py:34–37 ·
view source on GitHub ↗
(stack)
Source
from the content-addressed store, hash-verified
32
33
# Function to return the top from stack without removing it
34
def
peek(stack):
35
if
isEmpty(stack):
36
return
str(-maxsize - 1)
# return minus infinite
37
return
stack[len(stack) - 1]
38
39
40
# Driver program to test above functions
Callers
nothing calls this directly
Calls
1
isEmpty
Function · 0.70
Tested by
no test coverage detected