DEV Community

Cover image for Python - Introduction
vidhya murali
vidhya murali

Posted on

Python - Introduction

Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.

It is used for:

  • web development (server-side),
  • software development,
  • mathematics,
  • system scripting.

What can Python do?

  • Python can be used on a server to create web applications.
  • Python can be used alongside software to create workflows.
  • Python can connect to database systems. It can also read and modify files.
  • Python can be used to handle big data and perform complex mathematics.
  • Python can be used for rapid prototyping, or for production-ready software development.

Why Python?

  • Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
  • Python has a simple syntax similar to the English language.
  • Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
  • Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
  • Python can be treated in a procedural way, an object-oriented way or a functional way.

The most recent major version of Python is Python 3.14.6
In Python 3.14.6, the numbers follow Semantic Versioning style:

🔹 3.14.6 = Major.Minor.Patch

  • 3 → Major version
    Python 3 series.
    Major versions can introduce significant changes.

  • 14 → Minor version
    Python 3.14 release.
    Usually adds new features and improvements while maintaining compatibility as much as possible.

  • 6 → Patch version
    3.14.6 is the sixth patch release in the 3.14 series.
    Mainly contains bug fixes, security fixes, and small corrections.

Python Syntax compared to other programming languages

  • Python was designed for readability, and has some similarities to the English language with influence from mathematics.
  • Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
  • Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.

    print("Hello, World!")
    

Python Installation

you can download it for free from the official website: https://www.python.org/

Many Windows PCs and Mac computers already have Python pre-installed.

To check if Python is installed on Windows, search in the start bar for Python or run the following on the Command Line (cmd.exe):

To check if you have python installed on a Linux or Mac, then on linux open the command line or on Mac open the Terminal and type:

Flavors of Python

Types of Python compilers are referred as flavors of Python. They help to integrate various types of programming languages in Python some of them are:

  1. CPython:

It is a Python compiler that was implemented in C language. Even C++ code can be execute using CPython.

  1. JPython:

It is enables Python implementation to be run on Java platform. It runs on JVM.

  1. IronPython:

It is compiler designed for .NET framework, but it is written in C#. It can run on CLR(Common Language Run time).

  1. PyPy:

It is a Python implemented by using Python language itself. It runs fast since JIT is incorporated to PVM.

  1. Ruby Python:

It acts as a bridge from Ruby to Python interpreter. It embeds the Python interpreter inside the Ruby application

  1. Pythonxy:

It is written in the form of Python(X,Y). It is designed by adding scientific and engineering related packages.

7.Anaconda Python:

The name Anaconda Python is obtained after redeveloping it to handle large scale data processing, predictive analytics and scientific computing. It handles huge amount of data.

  1. Stackless Python:

Tasklets are the small tasks that are run independently. The communication is done with each by using channels. They schedule, control and suspend the tasklets. Hundreds of tasklets can run by a thread. The thread and tasklets can be created in stackless python. It is a re-implementation of python.

Python or Python3. What is the difference?

When it comes to programming, comparing Python and Python 3 is a topic that often sparks curiosity and debate. While both are powerful programming languages with their own unique features, understanding the differences between Python and Python 3 is crucial for developers looking to make informed decisions.

Python 2.0, released in 2000, introduced new features like list comprehensions and a garbage collection system capable of collecting reference cycles. Python's simple, easy-to-learn syntax emphasizes readability, which reduces the cost of program maintenance. Its modules and packages support program modularity and code reuse. Python's developers aimed to make it fun to use, which is reflected in its name, inspired by the British comedy group Monty Python.

Transition to Python 3

The transition to Python 3 was a significant step in Python's evolution. Released in December 2008, Python 3 aimed to rectify fundamental design flaws in the language. One of the most notable changes was the improvement of its Unicode support, which made Python 3 more suitable for modern web applications that require extensive text processing. Python 3's syntax was cleaned up to remove redundant constructs and modules, making it more consistent. This version also improved integer division, which now yields a float instead of truncating results.
However, these changes meant that Python 3 was not backward compatible with Python 2, requiring developers to adapt or rewrite their code. The Python community provided tools like '2to3' to help automate the transition. Despite initial resistance, the long-term benefits of cleaner syntax and better features have encouraged increasingly widespread adoption of Python 3.

Reference :

https://webnoidschools.com/flavors-of-python/

https://www.w3schools.com/python/python_intro.asp

https://proxify.io/articles/python-vs-python-3

Top comments (0)