PyDoc is accessed by using the help() function, as seen previously. While built-in objects can have multiple pages of information, your code doesn't have to be as elaborate, unless you want it to be. Depending on the Python version being used, you don't have to import the module you want help on, but it is generally better to import it, just to make sure.
Looking back at the preceding random() example, you can see that a lot of information is available via help(); of course, it is all dependent on how much information the developer decides to put into the docstrings. Functionally, the output is very much like using the Unix man command to view online command manuals.
One of the great things about help() is that it can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.