Difference between pydoc and help()?
Question: Are these two things different? The results that the two give in Python are
similar.


Answer: `help()` is a Python function.

`pydoc` is a command-line interface to the same thing.

If you want to see more what pydoc does, take a look in pydoc.py (`import
pydoc; pydoc.__file__`) and see what's in the `cli` function. It does do some
extra importing magic, but I don't think it really needs to - `help()` accepts
a string which is evaluated in the same sort of way, so if you have "foo.py",
run `python` and do `help('foo')` it'll get just about the same result as
`import foo; help(foo)` would, just with minor differences in layout, I think.
Probably historical reasons there.

In short, `pydoc foo` is about equal to `python -c "help('foo')"`

