Wednesday, 11 July 2018

Python Methods

Cited from the book "Python How to Program"

All Python data types contain at least three properties: a value, a type and a location. Some Python data types (e.g., strings, lists and dictionaries) also contain methods. A method is a function that performs the behaviors (tasks) of an object.

To invoke the list method, specify the name of the list, followed by the dot (.) access operator, followed by the method call (i.e., method name and necessary arguments).

No comments:

Post a Comment