Python Essentials
Python Essentials
What is Python?
• Python 2 uses print as a statement and used as print "something" to print some
string on the console. On the other hand, Python 3 uses print as a function and
used as print("something") to print something on the console.
• Python 2 uses the function raw_input() to accept the user's input. Python 3 uses
input() function which automatically interpreted the type of input entered by the
user.
• In Python 2, the implicit string type is ASCII, whereas, in Python 3, the implicit
string type is Unicode.
• Python 3 doesn't contain the xrange() function of Python 2. The xrange() is the
variant of range() function which returns a xrange object that works similar to Java
iterator.
• There is also a small change made in Exception handling in Python 3. It defines a
keyword as which is necessary to be used.
Python Applications
Getting Python
• The most up-to-date and current source code, binaries,
documentation, news, etc., is available on the official website of
Python https://www.python.org/
• You can download Python documentation
from https://www.python.org/doc/. The documentation is available in
HTML, PDF, and PostScript formats.
Installing Python
• Python distribution is available for a wide variety of platforms. You
need to download only the binary code applicable for your platform
and install Python.