Generate All Substring Leetcode Python Easy Tutorial