how to check python version in mac code example

Example 1: how to check python version

# To check your Python version in the command line use:
python --version

# To check your Python verson inside a script use:
import sys
print(sys.version)

Example 2: terminal python version

# in python
$ python --version

# in python3
$ python3 --version

Example 3: how to check python version

python --version

Example 4: how to check if python is installed on mac

Hi this is way simple..

Open terminal on your mac
Then type python - - version
If its give an error that means there is no python installed if it gives you the version number then python is installed..

Any by default python comes installed but the answer was just to make sure you do understand..

Good luck with learning python.. If you need any more with hacking and python let me know i have a YouTube channel just specifically for helping people getting started with hacking and. programming..