Pay attention that this code is good but it will not pass the test because every element in the list has to be a list. The following code should do the job: > [[s[:i+1]] for i in range(len(s))]
Agreed, and kudos for writing it in a "Pythonic" way; but the point of the problem, and hence this story, is not to have it implemented in the simplest way possible, but to make sure that the concept of mutability is well understood. Thanks for the reply, anyway! :)