Skip to content

Instantly share code, notes, and snippets.

@Tevinthuku
Created January 30, 2019 04:45
Show Gist options
  • Save Tevinthuku/acd9a91298304b927491879d3c8c6894 to your computer and use it in GitHub Desktop.
Save Tevinthuku/acd9a91298304b927491879d3c8c6894 to your computer and use it in GitHub Desktop.
Create a function that returns the sum of the two lowest positive numbers given an array of minimum 4 integers. No floats or empty arrays will be passed.
def sum_two_smallest_numbers(numbers):
return sum(sorted(numbers)[:2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment