Ad Code

Ticker

6/recent/ticker-posts

What is python?

What is python?




Python is a general purpose, dynamic, high level and interpreted programming language. It supports Object Oriented programming approach to develop applications. It is simple and easy to learn and provides lots of high-level data structures.It is easy to learn and a beginner friendly language.Python's syntax and dynamic typing with its interpreted nature, makes it an ideal language for scripting and rapid application development. Python supports multiple programming pattern, including object oriented, imperative and functional or procedural programming styles.

History of python:-

Python laid its foundation in 1980s and it is implemented in starting of December 1989 and it was founded by Guido Van Rossum in Netherland.

Guido Van Rossum

Guido Van Rossum is a Dutch programmer and was the founder of python programming language.He was born in Netherland on 31 January 1956.In Netherland he received the master's degree in mathematics and computer science from the University of Amsterdam.

In February of 1991, van Rossum published the code whose version is 0.9.0 to alt.sources.In 1994, it's version 1.0 released with new features lambda,map,filter and many more.After six and half years later, Python 2.0 released.Python 2.0 added new features like: list comprehensions, garbage collection system.On December 3, 2003 python released its version named 3.0(it was also called py3k and py3000).

Python 2.0 vs. Python 3.0:- 

In most of the programming languages, whenever a new version releases, it supports the features and syntax of the existing version of the language, therefore, it is easier for the projects to switch in the newer version. However, in the case of Python, the two versions Python 2.0 and Python 3.0 are very much different from each other.

A list of differences between Python 2 and Python 3 are given below:

  1. 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 printas a function and used as print("something") to print something on the console.
  2. Python 2 uses the function raw_input() to accept the user's input. It returns the string representing the value, which is typed by the user. To convert it into the integer, we need to use the int() function in Python. On the other hand, Python 3 uses input() function which automatically interpreted the type of input entered by the user. However, we can cast this value to any type by using primitive functions (int(), str(), etc.).
  3. In Python 2, the implicit string type is ASCII, whereas, in Python 3, the implicit string type is Unicode.
  4. 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. The range() returns a list for example the function range(0,3) contains 0, 1, 2.
  5. There is also a small change made in Exception handling in Python 3. It defines a keyword as which is necessary to be used. We will discuss it in Exception handling section of Python programming tutorial.

Post a Comment

0 Comments