LoginSignup
0
0

More than 3 years have passed since last update.

配列の中に追加(自分メモ用)

Last updated at Posted at 2019-06-09

配列の中に値を追加。

a = [1, 2, 3]
a.insert(2, "a") => [1, 2, "a", 3]

(2, "a")の第一引数(2)が何番目に追加するか、第二引数が何を入れるかとなる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0