This project demonstrates fundamental list operations in Python, including appending, inserting, extending, removing, sorting, and finding the index of specific values.
This repository contains a single Python script named list_operations.py which performs all the mentioned operations.
- Appending Elements: Add items to the end of the list
- Inserting at a Specific Index: Add an item at a specific position
- Extending with Another List: Combine two lists
- Removing Last Element: Remove the last element from the list
- Sorting: Arrange list in ascending order
- Finding Index of Value: Locate the position of a specific value in the list
To execute the program:
- Clone or download the repository.
- Open a terminal/command prompt.
- Navigate to the directory containing
list_operations.py. - Run
python list_operations.py.
After running the script, it will output the state of the list after each operation has been performed.