The Python programming language is a transformative tool that has shaped the internet as we see it today. From the development of popular websites such as Instagram, Netflix, Uber Application, Dropbox, and Google, to being the language used to build 1.3% of all the websites on the Internet, Python is nothing short of revolutionary (Francis, 2022).
Python is a sophisticated coding language that focuses on readability and practicality. Its simplicity and clean syntax make it a versatile choice for a wide range of applications, including website development, scientific modeling, and artificial intelligence.
How it all started
Python’s origins trace back to 1989 when Guido van Rossum began scripting Python as a side hobby inspired by Monty Python’s Flying Circus. Guido enjoyed an unwavering passion for coding and noticed complexities with a teaching programming language he had created in the early 1980s called ABC. After realizing that ABC’s complicated theoretical algorithms deterred people from resorting to it in the programming world, he decided to make a simple, practical, user-friendly coding language (van Rossum, 1996).
Although this started as a hobby with a name based on a British comedy troupe, his project later changed the landscape of programming forever.
Why Python is Essential?
Code is a form of text, and coding languages can be extremely complex and can involve elaborate algorithms that naturally make their text difficult to comprehend and hence challenging to use; which makes them inefficient to many programmers. Python resorted to syntax that highly resembles our English language with the way it is written and processed. The Python code reads like plain English, with the addition of mathematical constructs.
Using whitespace or indentation instead of braces or parentheses for statement grouping was a unique feature Guido had incorporated which resonated with our everyday human writing practices, making Python more accessible to a broader audience (Mathur, 2021). This made it easy to learn and understand. Hence, Python was popularized in secondary school teaching programs and highly favored over C and Java programming languages.
Having coded in Python, C++, C#, Java, HTML, and Fortran myself, I can confidently conclude that Python is the most essential coding language. I have used Python for intricate scientific pipelines, such as STDPipe (Simple Transient Detection Pipeline), which is a set of multiple Python routines developed for astrophysical photometry tasks. Python was able to combine theoretical physics phenomena and mathematical modeling in an easily reusable way.
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” ― Martin Fowler
(Goodreads, n.d.)
Syntax and Python’s Advantages
Python VS C
In the same way we hit enter to start a new line or paragraph in an essay or a document, a new line signifies the completion of a command in Python, eliminating the need for special characters like semicolons or parentheses seen in languages like C or RStudio. This highly improved the coding style’s consistency, reduced visual clutter, and allowed developers to use fewer lines than other programming languages.
Python is flexible. It problem-solves syntax issues to run the code up to a “fatal” problematic area, or in other words, will try to resolve errors on its own by implementing a feature called ‘run-time type’ checking rather than the normal ‘compile-time’ checking method used in other languages (Yegulalp, 2023). It is also dynamically typed, meaning one does not need to declare the data type of variables explicitly.
I can use the same method to define a number, a formula, or a word. In Python, assigning the number ‘5’ to the variable ‘x’ is the same as assigning the word ‘Hello’ to the variable ‘y’:
Python
x = 5
y = "Hello"
print(“x”)
print(“y”)
C
#include <stdio.h>
#include <string.h>
int main() {
int x; // Declare an integer variable named x
char str[100]; // Declare a character array (string) named str
x = 5; // Assign the value 5 to the integer variable x
strcpy(str, "Hello"); // Assign a string to the character array str
printf("x = %d\n", x);
printf("str = %s\n", str);
return 0;
}
The syntax used in programming languages such as C makes it much harder for developers to understand and distribute their work. Moreover, Python’s libraries, or built-in packages, help write stable, error-free codes, as well as make scripts ‘elegant’ as we call them in the programming world.
Python is not merely a coding language, but a fundamental element that influences how we interact with text technologies. Python is a testament to the power of simplicity and familiarity.
References:
- How to Master Python: A Tutorial. Udacity. (2020, December 29). https://www.udacity.com/blog/2020/12/how-to-master-python-a-tutorial.html
- Goodreads. (n.d.). Martin Fowler. Goodreads.
https://www.goodreads.com/quotes/6341736-any-fool-can-write-code-that-a-computer-can-understand - Python. (n.d.). The Python Logo. Python.org.
https://www.python.org/community/logos/ - Francis, P. (2022, October 19). How Is Python Different From Other Languages. Uvik.
https://uvik.net/blog/how-python-is-different-from-other-languages/#:~:text=Compared%20to%20Java%2C%20Python%20has,in%20handy%20for%20many%20purposes - Mathur, T. (2021, August 25). Basic Python Syntax and First Program in Python. Scaler Topics. https://www.scaler.com/topics/python/python-syntax/
- van Rossum, G. (1996, May). Foreword for “Programming python” (1st ed.). Python.org. https://www.python.org/doc/essays/foreword/
- Yegulalp, S. (2023, September 1). What is Python? Powerful, intuitive programming. InfoWorld. https://www.infoworld.com/article/3204016/what-is-python-powerful-intuitive-programming.html
- Mehta, R. (2020, February 18). A brief history of python programming language. Digital Nest Blog. https://www.digitalnest.in/blog/a-brief-history-of-python-programming-language/