Instagram
youtube
Facebook
Twitter

Python Overview

What is Python?

Python is a high-level interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable (the syntax of python is very easy). 

Advantages of Using Python:

  • It is highly readable
  • Python is platform-independent. This means you can run python scripts on all platforms like Linux, windows, mac os.
  • A Huge community of developers.
  • Python is a dynamically typed language. You don't have to define datatype before writing a variable.
  • Python has huge support for databases. Python can connect with databases like MySQL, Postgres, SQL Server, MongoDB, etc.
  • It is highly Scalable. You can use python to create an application of 10 lines of code to the millions of lines of code with the same ease.

Disadvantages of Using Python:

  • Python is an interpreted programming language because of which applications created with python are usually slower than other compiler-based programming languages like java, c++, etc.

Top Use cases of Python:

  • Web development.
  • Software development.
  • Scripting.
  • Machine Learning & Artificial Intelligence.
  • Gaming.

Difference Between Compiler and Interpreted Programming Languages

In general, programming languages can be classified into two categories based on how they are executed: interpreted languages and compiled languages. Python is an interesting language in that it can be executed in both interpreted and compiled modes. Here are the differences between these two approaches in the context of Python:

  1. Interpreted languages:
  • In an interpreted language like Python, the source code is directly executed by an interpreter. The interpreter reads the code line by line, translates it into machine code, and executes it. This process happens every time the code is run. Some of the characteristics of interpreted languages are:
  • They are typically slower than compiled languages because the code is not optimized before execution.
  • They are more flexible because the code can be modified and tested on the fly without the need for compilation.
  • They are generally easier to learn and use, since they don't require a separate compilation step.
  1. Compiled languages:
  • In a compiled language like C or C++, the source code is compiled into machine code before execution. The compiler takes the source code, optimizes it, and generates an executable file that can be run on a specific platform. Some of the characteristics of compiled languages are:
  • They are typically faster than interpreted languages because the code is optimized before execution.
  • They are less flexible because the code must be compiled before it can be executed, and any changes to the code require recompilation.
  • They are generally more difficult to learn and use, since they require a separate compilation step and can be more complex than interpreted languages.

In the context of Python, the language is typically executed in interpreted mode, but it can also be compiled using tools like PyPy or Cython. The advantages of using a compiled version of Python include faster execution speed and the ability to create standalone executables. However, the disadvantage is that the compilation process can be more complex and require more setup time.