Installation of Python
Installation of Python
Important differences between Python 2.x and Python 3.x with examples:
Division operator
Use of floats to get accuracy
print function
Use of parenthesis
Unicode
Str default
xrange
does not exist
Error Handling
Some more commonly used functions and methods that don’t return lists anymore in
Python 3:
zip()
map()
filter()
dictionary’s .keys() method
dictionary’s .values() method
dictionary’s .items() method
Most IDEs support many different programming languages and contain many more
features. The editor available with Python on download is IDLE and is best suited for
beginners. Other editors are:
Eclipse + PyDev
Sublime Text
Atom
GNU Emacs
Vi / Vim
Visual Studio
Visual Studio Code
PyCharm
Spyder
Thonny
Installation of Python.
Installing Python 3.X: The first thing we want to do is install the latest Python
distribution, which is Python 3.X.x.
We are going to use Python 3 because the most important Python libraries have
already been ported to Python 3 and also the next major Django version (2.x) won’t
support Python 2 anymore. So Python 3 is the way to go.
Go to www.python.org
Click on the Python download page, scroll down until you see the download
files listed below:
Make sure you check the option Add Python 3.6 to PATH
Click on the Install Now option.
Typing the word “python” at your system shell prompt like this begins an
interactive Python session; the “%” character at the start of this listing
stands for a generic system prompt
The Python Shell is where you can explore Python syntax, get interactive
help on commands, and debug short programs.
Other Editors.
From the editor you can run a script file by using ‘f5’ function key or the run option
from the menu.