Generate All Substring Leetcode Python Problems Practice