Skip to content

Instantly share code, notes, and snippets.

@ricardosiri68
Created April 27, 2013 23:02
Show Gist options
  • Save ricardosiri68/5475096 to your computer and use it in GitHub Desktop.
Save ricardosiri68/5475096 to your computer and use it in GitHub Desktop.
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