Number Of Occurrence Leetcode Solutions Python