Fyi, there's a mistake in your second solution - consider a strictly increasing list.
Thanks for the tip!
a = [2, 7, 8, 9]
highest = nexthighest = None
for item in a:
if not highest:
highest = item
elif item > highest:
nexthighest = highest
highest = item
elif not nexthighest:
nexthighest = item
elif item > nexthighest:
nexthighest = item
print highest + nexthighest
It evades sorting the array, but you have to search it twice.
Optimisation: just scan the array once, and keep track of the two highest numbers.