Number Of Good Pairs Leetcode Solution Python