Skip to content

EuniceRonke/Week-2-Python-Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Description

This Python program demonstrates basic list operations, including appending, inserting, extending, removing elements, sorting, and finding the index of a specific value.

Steps Performed

Create an empty list called my_list.

Append the values 10, 20, 30, and 40 to the list.

Insert the value 15 at the second position (index 1).

Extend the list by adding elements from another list: [50, 60, 70].

Remove the last element from the list using .pop().

Sort the list in ascending order using .sort().

Find the index position of the value 30 using .index() and print it.

Skills Practiced

Creating lists

Adding elements with .append() and .insert()

Merging lists with .extend()

Removing elements with .pop()

Sorting lists

Searching for elements with .index()

About

Python Assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors