isPythonVersion function and clearing whitespace