It is used to insert element in list before specified index.For an instance we want to add element before 2 index in list at hen we we write as shown below.
Example of List.Insert:
a=[‘apple’, ‘orange’, ‘mango’, ‘guavava’]
To Insert element before index 2 or before mango
a.insert(2,’pineapple’)
when you print list a element will have been inserted
[…] List.Insert: To insert object before […]