insert函數(shù)的用法?
insert()是Python中的內(nèi)置函數(shù),可將給定元素插入列表中的給定索引。
用法:
list_name.insert(index, element)
參數(shù):
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.