Using the dir() Function

There is a built-in function to list all the function names (or variable names) in a module. The dir() function:

import platform

x = dir(platform)
print(x)