Sunday, 13 September 2015

Python2 VS Python3

The main differences are:

Brackets in print statements

Python2

Python3

Unicode

Python2 has ASCII strings but no byte
Python3 has Unicode with byte and bytearrays

Raising exceptions

Where Python 2 accepts both notations, the 'old' and the 'new' syntax, Python 3 chokes (and raises a syntax error in turn) if we don't enclose the exception argument in parentheses.
And so on..we have many to go in depth for the analysis between the two versions.

Thus similarly, we have slight change with some of the syntax and some are fixed.Mostly the new beginners to python are recommended to go with Python3 which is the future of the language :)


Python SuPeriORity

PYTHON has many advantages comparatively with other programming languages:


  • It is free and open source and portable-it can be ported to any platforms.
  • A program written in compiled languages like c or c++ is converted from source language into machine understandable language(binary language)using a compiler.
  • Whereas python does not need compilation to binary it converts the source code directly into an intermediate form after just running the code.
  • Python standard library is huge indeed it includes all kinds of system dependent stuffs and it is always available wherever python is installed.
  • More than this it is syntax free :), it doesn't have much syntax to be followed making the programmers easy to solve the problem rather them to concentrate on the programming.

Python - mynew language

Python is a very simple language and easy to learn.
We have many docs for python and they are very readable.

http://www.swaroopch.com/notes/python/
which i used to start my programming with python :):)