Hithere could someone tell me what I did wrong for this question? Thanks!!

Count the parens in this line. 3 open and only 2 close.

```
>>> def append_size(lst):
extend = list(range(1,(len(lst) + 1)))
lst.append(extend)
return lst
>>> print(append_size([23, 42, 108]))
[23, 42, 108, [1, 2, 3]]
>>>
```

```
>>> def append_size(lst):
lst.extend(list(range(1,(len(lst) + 1))))
return lst
>>> print(append_size([23, 42, 108]))
[23, 42, 108, 1, 2, 3]
>>>
```

2 Likes

Thanks Roy, fixed the perens but still not doing what I want!

Also tried

extend = list(range(1,(len(lst) + 1))) but it’s nesting a separate list rather than just adding the numbers.

Many thanks!!

what is perens?

as you can see in @mtf code samples, `.append()`

will nest a separate list, which is why you need to extend the list. (also in mtf his code sample). Please check his excellent answer

3 Likes

**parens** is the short form of *parentheses* (plural).

1 Like

Really sorry, I missed your answer on that first reply. Makes sense and thanks so much for the help!

1 Like