Leetcode Second Largest Number Python Dictionary Check