def palindromic_substrings_iter(s):
if not s:<EOL><INDENT>yield []<EOL>return<EOL><DEDENT>for i in range(len(s), <NUM_LIT:0>, -<NUM_LIT:1>):<EOL><INDENT>sub = s[:i]<EOL>if sub == sub[::-<NUM_LIT:1>]:<EOL><INDENT>for rest in palindromic_substrings_iter(s[i:]):<EOL><INDENT>yield [sub] + rest<EOL><DEDENT><DEDENT><DEDENT>
A slightly more Pythonic approach with a recursive generator