Other method is to unpack all values in print and use new linenew line as separator
python -c 'import sys; print(*sys.path, sep="\n")'
I'm not sure but print() may have limit to 255 arguments (or maybe it had it in older versions)
but sys.path is shorter.
After ; one-liner doesn't allow for some constructions which normally need indentations:, like for-loop, while-loop, if/elif/else, try/except