If you are writing a simple script, one file, then the documentation lives in the script.
If I am running my script under Linux directly, I may start with a shebang (#!)
#!/usr/bin/env python
During a class in October 2023, I discovered a downside of this. If you write a python program in Windows, there is a [cr][lf] at the end of every line. If you write in Linux, there is only a [lf]. Python does not care and you can run either file type without issue. However, if you use the shebang directive above, it needs the python file to be in a Linux format. This was all news to me!
""" scanner.py: scans the local subnet using ping. """
If this is a single file, I do not have information elsewhere identifying the author, license etc. In Python we use double underscore or dunder variables to identify variables which need to be treated in a special way.