what is D's idiom of Python's list.extend(another_list)?

Mike Parker aldacron at gmail.com
Mon Jun 21 06:04:56 UTC 2021


On Monday, 21 June 2021 at 05:36:36 UTC, mw wrote:
> i.e append an array of elements into another array:
>
>
> ```Python
> x = [1, 2, 3]
> x.extend([4, 5])
> print(x)  # [1, 2, 3, 4, 5]
> ```
>
> Thanks.

```d
x ~= [4, 5];
```


More information about the Digitalmars-d-learn mailing list