Skip to content

Instantly share code, notes, and snippets.

@RangerDane
Last active July 28, 2016 21:41
Show Gist options
  • Save RangerDane/3f3f9c879bc191a97e3cf79b27a0067a to your computer and use it in GitHub Desktop.
Save RangerDane/3f3f9c879bc191a97e3cf79b27a0067a to your computer and use it in GitHub Desktop.
wut
import itertools
array = [1,2,3,4,5,6,7,8]
combs = itertools.combinations( array, 2 )
largest = 0
for x in combs:
largest = max( sum( x ), largest )
print largest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment