Python is the name of a programming language used to develop computer programs. Among the advantages that specialists attribute to it are the possibility of running it on multiple platforms, its efficiency and how easy it is to learn.
Open source , Python is an object-oriented language : this means that it is organized around data, and not based on logic or functions. On the other hand, it is an interpreted language because its code is transformed into bytecode and is executed directly by an interpreter (the Python virtual machine ). Therefore, it does not require compilation prior to execution.
Python History
The history of Python began in the late 1980s . At that time, Dutch programmer Guido Van Rossum began developing a project at the Centrum Wiskunde & Informatica in Amsterdam as entertainment in his free time. The initiative led, in 1991 , to the introduction of Python .
Van Rossum chose the name in homage to "Monty Python's Flying Circus" , a comedy program broadcast by the BBC . Three years after that first version ( 0.9.0 ), Python 1.0 was released, with more functions. Then came Python 2.x (as of 2000 ) and Python 3.x (in 2008 ). The most recent update to date is Python 3.12.2 , available for download in February 2024 .
The passage of time allowed us to add various functions to Python , which grew in flexibility and popularity. Today it is used to develop software for computers, mobile applications and websites, for example.
Main features
As we already indicated, Python is an interpreted language: the execution of its source code is direct, line by line. Such execution stops in the event of a programming error, making it easier to detect and handle errors.
Just as it is an object-oriented language, it also offers the possibility of using other programming classes, such as functional programming and structured programming . It is a language that resembles human language, using terms similar to those used in the English language, a particularity that gives it simplicity.
With indentations instead of curly braces and variable types that are determined simultaneously at execution, Python is easy to write and learn. Another important feature is that it is cross-platform : the same code can be used on different operating systems (such as macOS , Linux or Windows ).
Python is typically used with frameworks such as Flask, BeeWare , Kivy , TurboGears or Django . The choice of one or the other is usually associated with the needs of each programmer.
Python applications
Python applications are varied:
- Software Development : It can be leveraged for the automatic creation of programs, games or desktop applications through graphical user interface (GUI) libraries. It also allows project management.
- Test automation : PyUnit , Robot y Unittest son marcos de pruebas unitarias que posibilitan la comprobación de las funciones escritas. Pueden testearse características de los programas o la interfaz de usuario. Las herramientas de integración e implementación continuas (CI/CD), como Jenkins o Travis CI , sirven para la ejecución automática de scripts de prueba.
- Server-side web development : Backend functions can be established (such as communicating sites with databases and protecting information sent via the Internet).
- Artificial intelligence : With Python you can carry out data mining and promote machine learning and deep learning . Finding, extracting, correcting, deleting and viewing data are actions that can be carried out.
- Scripting and automation : The creation of scripts for machines of all types is another possibility, contributing to the advancement of robotics .
The libraries
In the field of programming, libraries are collections of code that are frequently used and can be reused, thereby avoiding the need to start writing the code from scratch. While Python features one standard library in its default version, there are approximately 140,000 others, such as Pandas , Matplotlib , Keras , Requests , Scikit-learn , NumPy , and Beautiful Soup .
These Python libraries include code for visualizing data with various graphs, creating arrays, and image processing, to name just a few of the options.
The Python Philosophy
The principles and precepts that govern the functioning of the language are called Python philosophy . Many of them were postulated by the American developer Tim Peters in what is known as "The Zen of Python" .
In Python , in this framework, the simple and explicit are privileged over the complex and implicit. Practicality and readability are also valued.
It is also highlighted that when it is difficult to provide an explanation of an implementation, it is a bad idea. On the contrary, an implementation that is easily explained is likely to be a good idea.