TECHIES WORLD

For Techs.... Techniques.... Technologies....

LinuxPython

Insert element to the n'th position of the list

We can insert element to the n'th position of the list using the following command.

#listname.insert(n, 'value')

Where,

listname - name of the list

n - index number

value - element to be inserted

 

Leave a Reply