In Perl, it was possible to use -c
to check only the syntax.
Python also wants to check the syntax, not "execute", but I wonder how to do it here.
python syntax-checking
The Python code cannot determine the syntax until it is compiled. I'll give you the option to compile it like this is it
$ python -m py_compile script.py
© 2024 OneMinuteCode. All rights reserved.