Skip to content Skip to sidebar Skip to footer

How Do I Get A List Of All The Built-in Functions In Python?

I'm trying to put together a canonical example of how to get a list of all the builtin functions in Python. The documentation is good, but I want to demonstrate it with a provable

Solution 1:

import __builtin__
import inspect

[name for name, function in sorted(vars(__builtin__).items())
 if inspect.isbuiltin(function) or inspect.isfunction(function)]

There's also the list in the documentation.


Post a Comment for "How Do I Get A List Of All The Built-in Functions In Python?"