Python is portable - Does it mean python scripts or python executable?
The Python script is portable because it runs on the Python Virtual Machine (PVM)
Python is basically an interpreted language. However Python implementations may compile source code to bytecode in order to reuse/optimize/whatever so in some sense/implementation Python is a compiled language
Python is an interpreted language, as opposed to a compiled one, though the distinction can be blurry because of the presence of the bytecode compiler. This means that source files can be run directly without explicitly creating an executable which is then run.
https://docs.python.org/3/glossary.html#term-interpreted
Like JVM, the PVM is an abstract machine that runs on the current computer so we needs a PVM implementation for each platform which means the Python executor is not portable, but the compiled code (*.pyc) is portable, like the Python script
However currently it's even possible to have a portable PVM. Just a single executable can run on Linux, Mac, Windows, NetBSD, FreeBSD, OpenBSD because of the great αcτµαlly pδrταblε εxεcµταblε (APE) project so one can distribute their work easily by providing a small Python executable (which is just more than 4MB at the moment) along with a *.py file
See Python is Actually Portable
See also