Which Linux command could be used to verify which Python version would be used for a script if you did not include the shebang?
- which version
- python version
- which python version
- which python
Explanation: If a shebang (e.g., #!/usr/bin/env python) is not included as the first line of a script, the shell environment will use the version of Python that is currently configured in the system's environment. To verify which Python executable and version would be used in this scenario, you can use the Linux command which python. While the shebang is recommended to enforce a specific version or to run a script as a standalone binary, the which python command allows an administrator to check the environment's default path for the Python interpreter.
Related exam: Modules 21 – 22: Checkpoint Exam: Programmability Answers (CCNP ENCOR v9)
