Skip to content

prajuu24/Methods-of-List

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Methods-of-List

we have different types of list in python as:

  1. Append(): Adds an item to the end of the list
  2. Extend(): Adds all items from an iterable (e.g., list, tuple) to the end of the list.
  3. Insert(): Inserts an item at a specified index.
  4. Remove(): Removes the first occurrence of an item.
  5. Pop(): Removes and returns the item at the given index (or the last item if index is omitted).
  6. clear(): Removes all elements from the list, making it empty.
  7. index(item): Returns the index of the first occurrence of an item.
  8. count(item): Counts the occurrences of an item in the list.
  9. sort(): Sorts the list in ascending order
  10. reverse(): Reverses the order of items in the list.
  11. copy(): Returns a shallow copy of the list.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages