List Methods & Functions

M3-R5.1 · Chapter 5: Sequence Data Types · 1 min read

List Methods 

In Python, list methods are built-in functions specifically used to perform operations on list objects, such as adding, removing, or modifying elements.

You call a method by putting a dot after the object:
     
      list.method().

List Functions 

Functions are independent blocks of code that perform a specific task when called. Unlike methods, which are "attached" to a specific object.

While list methods (like .append()) only work on lists, these functions are standalone and often used to process or analyze list data