Skip to content

Instantly share code, notes, and snippets.

@amlanpatnaik001
Created October 16, 2025 02:50
Show Gist options
  • Save amlanpatnaik001/059745d3c2f3d6f8e08e6947f03d9e01 to your computer and use it in GitHub Desktop.
Save amlanpatnaik001/059745d3c2f3d6f8e08e6947f03d9e01 to your computer and use it in GitHub Desktop.
from functools import reduce
numbers = [1, 2, 3, 4]
result = reduce(lambda x, y: x + y, numbers)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment