dir()
如果对 dir() 的用法不是很清楚,可以使用 help() 来查看帮助:
>>> help(dir)
Help on built-in function dir in module builtins...object: the module's attributes.
...math # 内置模块 math
>>> dir(math)
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec...OverflowError', 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError', 'RecursionError', 'ReferenceError...UnicodeTranslateError', 'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning', 'ZeroDivisionError', '_', '__build_class