Get Started with Python
For Linux/Mac
Python Installation
By default MAC has the python
Donwload python 3 from https://www.python.org/downloads/
To associate the python command with python3, modify the bash_profile confgurations.
nano .bash_profileAs part of version 3, bash_profile is modified. Create an alias at the bottom of the file. Don’t leave any space before and after the =.
After the bash_profile update, close the terminal and reopen to verify the ‘python — version’ command.
Interactive Prompt
Type just python, you ‘ll get interactive python. The three arrows tells you that you are in interactive prompt. This allows me to type only one line. That’s the downside of it.
You can print and store a value to a variable, etc.,
Interactive Prompt can be closed using () open and close parenthesis.
Python Editor — IDLE
The below screenshot is what you’ve downloaded from python.org and installed on your system. IDLE is the python editor.
Create ‘Hello World’ python program
- Create a file by clicking File -> New file
- Add print line
- Save it by clicking File -> Save -> <file_name>.py
IDLE is not suitable to do a lot of python programs. So go for the other popular editors.
Other popular Text Editors
- Sublime Text
- Atom
- JetBrain’s pyCharm (fullblown IDE) *
The first two has a lot of built-in functionality. PyCharm has the ability to debug and run applications
Keys for nano
Ctrl + O — Save
Get Developer Notes’s stories in your inbox
Join Medium for free to get updates from this writer.
Ctrl + x — exit
For Windows
Select the option ‘Add Python to Path’ by ticking the checkbox and the rest is same like Linux or mac







