Python 3.x is a new version of the language, which is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. You can also know more features in python 3.5
Step #1 Require Package
Firstly make sure that all require packages installed on your system. Use following command to install all packages:
# yum install gcc
Step #2 Download Python 3.5
Download Python using following command and you can also download latest version from python official site.
# cd /opt
# wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
Step #3 Extract Archive and Compile
Use below commands to extract Python source code and compile it on your system using altinstall.
# tar xzf Python-3.5.1.tgz
# cd Python-3.5.1
# make altinstall
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.
Step #4 Check the Python Version
Check the latest version installed of python using below command
# python3.5 -V
# python3.5 --version