I have been learning machine learning and neural networks for some time. Therefore I have both 2.7.11 and 3.5.2 versions of python on my Ubuntu 16.04 installed with the purpose of learning Tensorflow. I sometimes may use python interchangeably, can I continue using both of them, or there are some constraints?
This is fine, and completely normal. Python 2.x and Python 3.x are completely separated on the file system.
It only becomes a problem if either you or a library you are using, intentionally does something wrong by crossing the paths. As long as you don't alter the standard installation, you can use either one. For new code, it is generally recommended that you should write only Python 3.x code though.