Mirror of
forum.nim-lang.org
index
8366 :: What's Nim's equivalent of Python's append() method for lists?
[2021-08-25T18:22:29+02:00]
View Orginal
mareklachbc
(orginal)
[2021-08-25T18:22:29+02:00]
view original
Couldn't render post #53929.
konradmb
(orginal)
[2021-08-25T18:31:25+02:00]
view original
It's add()
https://nim-lang.org/docs/system.html#add%2Cseq%5BT%5D%2CopenArray%5BT%5D
miran
(orginal)
[2021-08-25T18:32:42+02:00]
view original
use triple backticks for code blocks
you need sequences (
@[]
), not arrays (
[]
)
you need
add
, not
append
read more:
https://nim-lang.github.io/Nim/sequtils.html
robb1e
(orginal)
[2021-08-25T18:37:26+02:00]
view original
a.add(b)
Neodim
(orginal)
[2021-08-26T14:55:50+02:00]
view original
a &= b
Run
works as well