This repository contains a Python script that demonstrates fundamental list operations as part of a weekly assignment.
The script, list_operations.py, performs a series of actions on a Python list, showcasing how to manipulate data structures efficiently.
The program addresses the following tasks:
- Create an empty list called
my_list. - Append the elements
10, 20, 30, 40tomy_list. - Insert the value
15at the second position (index 1) of the list. - Extend
my_listwith another list:[50, 60, 70]. - Remove the last element from
my_list. - Sort the list in ascending order.
- Find and print the index of the value
30in the sorted list.
- Python 3.x installed on your machine.
-
Clone the Repository:
git clone [https://github.com/your-username/your-repo-name.git](https://github.com/your-username/your-repo-name.git)
Remember to replace
your-usernameandyour-repo-namewith your actual GitHub details. -
Navigate to the Project Directory:
cd your-repo-name -
Execute the Script:
python list_operations.py
The program will run and print the final index of the value 30 to your console.