@Sudhaharan M
From Ambari Server you can not change the Python version in your cluster. Ambari Server does not manage the python version.
Please refer to the SupportMatrix to know which OS is supported with the ambari/hdp version that you are using and then accordingly you can get the desired Python version from the OS repos.
https://supportmatrix.hortonworks.com/
.