News for hackers. Stuff that matters.
Re:On Secretly Terrible Engineers by Luyt on Sunday March 08, 2015 @06:56PM (#9167746)
I can do that in Python ;-)

    a = [7, 9, 2, 8] 
    print sum(sorted(a)[-2:])
Re:On Secretly Terrible Engineers by codygman on Sunday March 08, 2015 @07:48PM (#9167932)
Oh cool, slices don't return index errors:

    >>> print sum(sorted([])[-2:])
    0
Re:On Secretly Terrible Engineers by Luyt on Sunday March 08, 2015 @09:01PM (#9168219)
Reading the original problem, "Write a function that returns the sum of the two largest numbers in an array", I took the liberty of assuming that the input list would always contain at least two items.