Here, we are implementing a python program for various list operations, following operations are being performed in the list,
- Declaring an integer list
- Printing the complete list
- Printing the first element of the list
- Printing ith element of the list
- Printing elements within the given indexes
- Printing a specific element using negative indexing
- Appending an element to the list
- Finding the index of a specific element in the list
- Sorting the list elements
- Popping an element from the list
- Removing specified element from the list
- Inserting an element at specified index
- Extending the list i.e. insert set of element (list) in the list
- Reversing list elements
Python code for various list operation
Output
need an explanation for this answer? contact us directly to get an explanation for this answer