Python‎ > ‎list‎ > ‎

list.insert()

http://www.adilwaseem.com/

Definition
Add object before index

Syntax
list.insert(index, object)

Parameters
object

Examples
The method return as:
 x=[55,887,99,777]
x.insert(2,88)
print(x)
>>> 

[55, 887, 88, 99, 777]
>>> 

Comments