SLPay 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))]Reply·Article·Aug 19, 2016·1·The List Mutability Pitfall in Python
SLYou meant "enumerate(triangle_list)" and not "enumerate(triangle)", right?Comment·Article·Aug 19, 2016·2·The List Mutability Pitfall in Python