Example & Tutorial understanding programming in easy ways.

How do you insert a new item in list at required index position in Python ?

We can do this with the help of the insert() function in Python 

like:

l=[1,2,3,4]

l.insert(2,18)

print(l)

output:

[1,2,18,3,4]

Read More →