How can I check the syntax of Python script without executing it? You can check the syntax by compiling it: