I was trying to set default python version to python3 in Ubuntu 16.04. By default it is python2 (2.7). I followed below steps :
EDIT:
I wrote this when I was young an naive, update-alternatives is the better way to do this. See @Pardhu's answer.
Open your .bashrc file
nano ~/.bashrc. Typealias python=python3on to a new line at the top of the file then save the file with ctrl+o and close the file with ctrl+x. Then, back at your command line typesource ~/.bashrc. Now your alias should be permanent.