首页后端开发Pythoninsert函数的用法

insert函数的用法

时间2023-06-06 04:39:02发布访客分类Python浏览603
导读:insert函数的用法?insert( 是Python中的内置函数,可将给定元素插入列表中的给定索引。用法:list_name.insert(index, element 参数:index - the index at which the...

insert函数的用法?

insert()是Python中的内置函数,可将给定元素插入列表中的给定索引。

用法:

list_name.insert(index, element)

参数:

index - the index at which the element has to be inserted.

element - the element to be inserted in the list.

返回值:

This method does not return any value but

it inserts the given element at the given index.

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: insert函数的用法
本文地址: https://pptw.com/jishu/63492.html
global关键字的用法详解 python中turtle的goto函数用法

游客 回复需填写必要信息