Find the Runner-Up Score!

  • + 15 comments

    You can try it! :)

    nums = [1, 2, 2]
    print sorted(list(set(nums)))[-2]
    

    Prints '1' for me. The 'set' function returns only unique values (here, [1, 2]), and then after sorting, the second to last element is printed.