I want a list of all modules in the standard library.
As to the keywords, I grab them by:
import keyword
>>> keyword.kwlist
['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
For builtins:
>>> dir(__builtins__)
['ArithmeticError', ..., 'super', 'tuple', 'type', 'vars', 'zip']
How to apply the same operation to other standard library names found in Python official documentation.
# my desired result is this
['colletions', 'datetime', 'os', ... ]
# So will check them for reference anytime and anywhere.
See Question&Answers more detail:
os