How to view a list of all Python operators via the interpreter?

PythonProgramming

The help method in the interpreter is very useful for such operations. It provides a rich set of special inputs that you can give to it to get information about the different aspects of the language. Forgetting operator lists, here are some of the commands you can use:

All operators

>>> help('SPECIALMETHODS')

Basic operators

>>> help('BASICMETHODS')

Numeric operators

>>> help('NUMBERMETHODS')

Other than operators you can also get attribute methods, callable methods, etc using −

>>> help('MAPPINGMETHODS')
>>> help('ATTRIBUTEMETHODS')
>>> help('SEQUENCEMETHODS1')
>>> help('SEQUENCEMETHODS2')
>>> help('CALLABLEMETHODS')
raja
Updated on 05-Mar-2020 07:29:37

Advertisements