When we run a command like python --version
from CLI, Windows looks for python.exe from the “Environment Variables”, specifically checks the PATH variable. If you want to know from where the executable got resolved, you can use a handy utility called where.exe:

Of course, we can where
the where
🙂

Happy coding!