# insert()の使い方

Home List Methods

# insert()の例1

Insert the value "orange" as the second element of the fruit list:

    fruits = ['apple', 'banana', 'cherry']
    fruits.insert(1, "orange")

# insert()の定義と使い方


# insert()の構文

list.insert(pos, elmnt)

# insert()の引数

パラメータ 説明

pos 必須. A number specifying in which position to insert the value:

elmnt 必須. An element of any type (string, number, object etc.)

Home List Methods