Generate All Substrings Leetcode Python Challenges Code