This Python script demonstrates common list operations such as adding, inserting, extending, sorting, and finding elements.
- Creates an empty list
- Appends values:
10
,20
,30
,40
- Inserts
15
at the second position - Extends the list with
[50, 60, 70]
- Removes the last element
- Sorts the list in ascending order
- Finds the index of value
30
and prints it
Index of 30: 4
Final list: [10, 15, 20, 30, 40, 50, 60]
list_operations.py
: Python script with the list operations
Augusto Mate
📧 mate.augusto.mz@gmail.com
This project is licensed under the MIT License.