Guest User

Untitled

a guest
Jun 8th, 2014
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def get_two_max(arr):
  2.     output = [float('-inf'), float('-inf')]
  3.     for i in arr:
  4.         if i > output[0]:
  5.             output[0] = i
  6.         elif i > output[1]:
  7.             output[1] = i
  8.     print(output)
Advertisement
Add Comment
Please, Sign In to add comment