2024-05-29 11:21:28 发布
网友
python编程新手,我正在尝试使用列表,我有一行代码是holos.insert("holo_enter_info\n"),但出于某种原因,它说它需要2个参数,但它只得到1个。我不知道那意味着什么有人能帮我吗
holos.insert("holo_enter_info\n")
从programiz:
插入()参数
insert()方法采用两个参数:
insert()
索引-需要插入元素的索引
元素-这是要插入列表中的元素
Notes:If index is 0, the element is inserted at the beginning of the list.If index is 3, the element is inserted after the 3rd element. Its position will be 4th.
Notes:
If index is 0, the element is inserted at the beginning of the list.
index
If index is 3, the element is inserted after the 3rd element. Its position will be 4th.
从programiz:
插入()参数
insert()
方法采用两个参数:索引-需要插入元素的索引
元素-这是要插入列表中的元素
相关问题 更多 >
编程相关推荐