What is Python?

Created by Guido van Rossum in late 80s and early 90s, Python is a general-purpose scripting language. It is a high-level programming language which supports object-oriented principles. The python source code is available under the GNU General Public Licence (GPL).

There are two major versions of python, 2.x, and 3.x. We cover Python 3.x on this website as it is more semantically correct and compatible, and also supports few new features and packages. In addition, many scientific libraries and packages are aiming to stop supporting version 2.x soon. In the near future, there will be no security and bug fixes for Python 2.x.

Getting Started with Python

Python Control Flow Statements

Python Functions and Methods

Why Python?

Python is an interpreted language as when running a python program, your code is parsed line by line by an interpreter unlike compiled languages such as C or C++. This make python programs little bit slow compared to those written in compiled languages. However, most of the compiled languages are complicated, and their syntax and semantics are difficult to follow for new programmers.

In contrast, the syntax and semantics of Python are so easy to read and follow that even people who are completely new to the programming can understand the context of python code. Python uses English keywords frequently which makes it easier for beginners to learn and understand the code easily. It has many inbuilt functions and data structures defined so you won’t have to worry about all the minor details and get straight into solving the actual problem. You can write less code and achieve more with the use of these inbuilt functions and data structures. This makes python more beginner-friendly compared to most of the other programming languages.

Also, python is an interactive programming language. It means that you can interact with the interpreter directly while writing programs using your python prompt. This makes it easy while testing and debugging your source code.

Python is dynamically and strongly typed, which means while defining a python variable, the data type is not needed to be declared. Python automatically assigns the data type to the variable based on the type of value it holds. It is strongly typed in a sense that it doesn’t allow automatic data type conversion. You need to manually convert data from one type to another when needed.

Python Features

In addition to above-mentioned features, there are many other features which make python as popular as it is among the programmers, such as:

  • It supports object-oriented principles as well as functional and structured programming approach.
  • Python has an automatic garbage collection.
  • It supports GUI application development.
  • Along with using inbuilt modules and libraries, you can also add your own modules to the python interpreter which allows you to enhance the already powerful programming language.
  • Python is portable as you can run same python program on most of the popular hardware and software platforms without having to write programs separately for each of them.