Skip to content

Instantly share code, notes, and snippets.

@ysnerdem
Created November 6, 2017 18:15
Show Gist options
  • Save ysnerdem/722175b319d96432b68cf507cd79e3fe to your computer and use it in GitHub Desktop.
Save ysnerdem/722175b319d96432b68cf507cd79e3fe to your computer and use it in GitHub Desktop.
numbers = [-2, 5, 16, 21, -21, 1]
def Find_max(list):
if len(list) == 1:
return list[0]
else:
max = Find_max(list[1:])
return max if max > list[0] else list[0]
print(Find_max(numbers))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment