how to assign multiple variables at once by unpacking array?

mw m at g.c
Sat Oct 7 07:31:45 UTC 2023


https://stackoverflow.com/questions/47046850/is-there-any-way-to-assign-multiple-variable-at-once-with-dlang

How to do this Python code in D:

```
>>> s = "1 2 3"
>>> A,B,C = map(int, s.split(" "))
>>> A,B,C
(1, 2, 3)

```

Is there a better way (since 2017)?




More information about the Digitalmars-d-learn mailing list