sys.path in Python
Here is the process how sys.path is set in Python, with some parts omitted.
Python Command Line Arguments
By default, as initialized upon program startup, a potentially unsafe path is prepended to sys.path:
python -m: prepend the current working directory.
python script.py: prepend the script’s directory. If it’s a symbolic link, resolve symbolic links.
python -c and python (REPL): prepend an empty string, which means the current working directory.
You can remove these path with -P param.