THE HELP() AND DIR() FUNCTIONS
An Internet search for Python-related topics usually returns a number of links with useful information. Alternatively, you can check the official Python documentation site: docs.python.org
In addition, Python provides the help() and dir() functions that are accessible from the Python interpreter. The help() function displays documentation strings, whereas the dir() function displays defined symbols.
For example, if you type help(sys) you will see documentation for the sys module, whereas dir(sys) displays a list of the defined symbols.
Type the following command in the Python interpreter to display the string-related methods in Python:
>>> dir(str)
The preceding command generates the following output:
['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__ getattribute__', '__getitem__', '__getnewargs__...