Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list peek python

def peek_stack(stack):
    if stack:
        return stack[-1]    # this will get the last element of stack
    else:
        return None
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #peek #python
ADD COMMENT
Topic
Name
1+2 =