Skip to content

Mkhambe234/python-assignment-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Explanation of each step: my_list = [] creates an empty list. append() adds elements to the end of the list. insert(1, 15) inserts 15 at index 1 (second position, since Python uses 0-based indexing). extend([50, 60, 70]) adds multiple elements to the end of the list. pop() removes the last element (70 in this case). sort() arranges the list in ascending order. index(30) finds the position of 30 in the sorted list (which is 3 in this case).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages