title: Switch between Python 2.7 and 3.6 using terminal in Mac OS
body: <p>I want to run a python script using the terminal in macOS. </p>
  
  <pre><code>$ python main.py
  </code></pre>
  
  <p>I would like to have the option of switching between python 2.7 and 3.6 versions. I have installed both the versions using homebrew. When I run the above command, it runs using Python 3.6 by default, but i need to run using 2.7. How can I do it? </p>
  
  <p>Thanks,
  Vinil</p>