It is necessary to create a cycle for generating a list in which each subsequent value is formed from the previous one. Below is an example of the algorithm.
var = 'a' list = [var, list[0] + 'b', list[1] + 'c', list [2] + 'd'] Exit from the loop after forming 4 values