how to check if python 2 is installed code example Example: python version command import sys print(sys.version)