Download the latest version you want to upgrade from python.org.. i.e. 3.x branch of 2.7.x branch
Extract on your system
To replace the 2.7.xx version on your system use sudo make install, to keep the old version use sudo make altinstall.
To verify you have the latest verison installed, open a new terminal and enter:
$ python –version
The altinstall method will allow to keep two 2.7x versions on your system.
Read more about altinstall here: