how to check python versions code example Example 1: how to check python version python --version Example 2: python version python ––version