python version in project code example Example 1: python version python ––version Example 2: python version command import sys print(sys.version)