Created
April 27, 2013 23:02
-
-
Save ricardosiri68/5475097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def new(): | |
return [] | |
def apilar(pila,elem): | |
pila.append(elem) | |
def desapilar(pila): | |
return(pila.pop()) | |
def invertir(pila): | |
return (pila.reverse()) | |
def tope(pila): | |
return pila[len(pila)-1] | |
def esvacia(pila): | |
if len(pila)==0: | |
return 'true' | |
else: | |
return 'false' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment