Last active
July 28, 2016 21:41
-
-
Save RangerDane/3f3f9c879bc191a97e3cf79b27a0067a to your computer and use it in GitHub Desktop.
wut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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