Count Number Of Substrings Leetcode Python Problems