Skip to content

Instantly share code, notes, and snippets.

@ricardosiri68
Last active December 16, 2015 05:28
Show Gist options
  • Save ricardosiri68/5384377 to your computer and use it in GitHub Desktop.
Save ricardosiri68/5384377 to your computer and use it in GitHub Desktop.
# max es una funcion nativa de paython asi que
# no la podes usar como nombre de variable
def maximo(lista,i=0,m=0):
if i == len(lista) - 1:
return m
else:
if lista[i]>=m:
m=lista[i]
return maximo(lista,i+1,m)
lista=[1,50,60,5]
print maximo(lista)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment