Why Python

Why Python?

Simple to Learn

Python is very simple to learn. Very minimal computer knowledge is required to learn and use Python. You don’t need to know the difference between computer memory and a hard drive, you don’t need to know what an operating system is, you don’t need to know what a compiler is, nor do you need to know about build systems, and you don’t need to learn any other programming languages first. Whether you’re new to computers or not, you can learn Python. Python is also built with a goal to be easy to read and understand.

Simple to Use

There are several core tenets of the Python programming language that makes it simple to use. One of the first tenants contributing to Python’s ease of use is that there is usually only one way to do things. Some programming languages believe strongly in flexibility, that the developers should be able to solve a given problem in many different ways. Python is not one of these languages. Being able to solve a single problem many ways is like having a large box of building blocks without any instruction book, or it can be like sitting in front of a blank canvas and being able to paint anything you want. At times, this feeling can be very freeing. When you are first using a programming language, though, constraints are very good to have. They provide guardrails that helped guide you to a likely solution. The constraints help point you in a direction that will help you maintain your forward momentum. This single way to accomplish a task also translates to Python’s next tenant. Python focuses on simplicity. That simplicity translates to ease of use. Excess complexity introduces confusion. Let’s say you were wanting to learn to use a new device. If there are lots of knobs to turn, levers to pull, and buttons to push, it can be difficult to figure out how to use that device, but with a simplified and intuitive interface, what needs to be done becomes clear and more obvious. That’s why a language that focuses on simplicity like Python is simple to use as well. Finally, Python and its community encourages beautiful code. The focus on beauty makes it a more pleasurable experience to use. When you don’t enjoy using something, it makes it more difficult to continue using that thing. If something brings you joy, though, it increases your desire to continue using it. The Python community has come to embrace this principle when building Python features. For these reasons, and more we’ll investigate in our next module, Python is a programming language that is simple to use.

Great Community

A large contributing factor to Python being simple to learn and use is thanks to support from Python’s great community. The Python community has driven many core principles into Python, which has helped it become what it is today. The community involvement can be seen directly in how Python is supported and how Python is developed as a language. The community provides great support for developing Python code. You can see this in the countless third‑party Python packages and code libraries that are available, the great third‑party tools that can be used when using Python, and much more. We will take a closer look at these later in this course. Python’s development is also conducted largely through community‑driven proposals called Python Enhancement Proposals, also known as PEPs. This process is the primary mechanism for proposing major new features, for collecting community input on an issue, and for documenting the design decisions that have gone into Python. Outstanding proposals are reviewed and commented upon by the Python community. This has enabled Python to evolve as a shared language and evolved to user’s changing needs over the many years. Many of the principles we’ve already covered in this course were arrived at as part of this process.

High Demand Python continues to grow in popularity, and the ability to work with Python is a skill that’s increasing in demand in the industry. In even the recent past, when many developers thought of popular programming languages, they tended to think of Java, C#, C++, JavaScript, and perhaps even PHP. Python didn’t usually come to mind. But according to some recent Stack Overflow analysis, Python has now overtaken other languages like Java, C#, and C++ based on Stack Overflow question views. And according to PYPL, the PopularitY of Programming Language Index, Python is now the most popular programming language, with its popularity continuing to grow each year. And it doesn’t stop there. Python has the highest spectrum rating according to the recent IEEE Spectrum report, and the TIOBE index now has Python in the top three of programming languages worldwide. All this to say, there’s really no longer any denying that Python is a popular programming language and a great language to invest your time into learning.


Widely Used Over its many years of usage, Python has continued to grow and has become increasingly powerful and capable. Python has been used anywhere from special effects in movies like Star Wars to application scripting support in the popular open source, 3D modeling application, Blender. Four areas I’ll highlight where Python has seen widespread use are web development, data science, education and learning, and scripting. As we briefly discuss each, it’s okay if you don’t understand what each area is or how Python is used within it. With these examples, I’m just aiming to emphasize that Python is widely used in many different areas.

Web Development The first area we’ll discuss where Python has seen growing use is in the area of web development. There are many different buckets or styles of web development. You might be developing just an HTTP or REST API and, hence, not dealing with front‑end user interfaces, just back‑end service code. Or, you might be building a full‑stack web application that touches both the client and the server. You might even be working with an out‑of‑the‑box content management system application, ERP application or an application of a different flavor. No matter which it is, though, there’s a Python solution out there for you. If you’re building APIs, you can find existing popular Python frameworks like Flask, Bottle, Pyramid or a myriad of others. And the same goes with full‑stack web development. You have popular frameworks like Django, TurboGears, web2py, and many others at your disposal. And for the full, self‑contained web applications, you can find apps like Plone, django CMS, Mezzanine, and more. Basically, no matter what type of web application you’re developing, Python is being used out there today and can likely meet your needs too.

Data Science Data science is a field that is growing in popularity with each passing week. Data science itself is an exceptionally large field. Two common areas that tend to be wrapped up in the data science field are those of big data and machine learning. Let’s take a quick look at both of them. So what is big data? As developers, we’re used to thinking of data in terms of kilobytes, megabytes, and gigabytes, but data is growing rapidly. More and more systems are needing engineers to start thinking in the terms of terabytes, petabytes or, in some cases, even exabytes. Yes, exabytes. The amount of data being generated each day is growing rapidly and shows no signs of stopping. As of 2012, 2.4 EB of new data were generated every single day. To put that in perspective, that is 2.5, followed by 18 zeros. Datasets have grown so large that existing data processing systems are unable to deal with them. New systems are needed. This is where the growing popularity of technologies like Hadoop and MapReduce are coming from. What used to be a problem faced primarily by large companies like Google or Microsoft is now starting to be faced by smaller enterprise businesses. The more data we have available to us, the more we can spot new business trends, find correlations to help prevent new diseases, combat crime, and so on. And Python is a popular programming language used in this space. Now, machine learning is not directly related to big data; however, the more data we have available to us, the more powerful machine learning becomes. So what is machine learning? Today we are surrounded by data everywhere. It comes in all forms, shapes, and sizes. It might come from large text files, or it might be generated by the actions of users. It may be the large amount of metadata available in pictures and videos, or it might be networks and graphs of relationships people have with each other. The many relationships that might exist between all this data is potentially much more complex than any single person or group of people could find. It’s like finding a needle in a haystack. So instead, algorithms are written in such a way that a computer can process all the data and find its own connections between the many different sources. Machine learning is now commonly used in several different places. It can be used to help determine whether a given piece of email is spam or not, it can be used to help detect possible network intrusions by using the vast amount of network traffic to detect what is abnormal or not, it’s used for optical character recognition to convert images of text into text data that a computer can understand and process, or it can be used for computer vision problems like face detection, object tracking, and motion tracking, and new uses for machine learning are being discovered every day.

Education and Learning Python is widely used in education and learning, and its popularity continues to grow in the field. Python is getting wider adoption as a language to use when teaching basic STEM skills to younger students across the world. It’s also being used as a first programming language in which to teach people programming in the first place. This usage is not just for younger students either, as Python is becoming more popular as a language to teach programming in college courses around the world as well. Python is being used as an education tool to teach people more about computing hardware as well via accessible maker devices like the Raspberry Pi and the micro:bit. Another great way Python is used in education is via Jupyter Notebooks. Sometimes the best way to learn is through interaction and exploration of what code does and the consequences of changing a given piece of code. Jupyter Notebooks, a project that grew out of the interactive Python interpreter IPython are a great way to share different topics with people and to encourage people to explore a given topic in an interactive way that can be changed in code. Jupyter Notebooks have exploded in popularity lately, especially in the data science space, and is pushing forward the concept of interactive education, especially in computer programming.

Scripting One of the most common uses of scripting with Python is to perform administration of computers When writing scripts to administer a machine, it’s routine to work with folders and files on the machine, perhaps managing a series of log files or examining and monitoring the file system. Or we might be dealing with the configuration of apps and services. We can monitor the processes running on a system, keeping an eye on any potential runaway processes that need to be kept in check. We may even deploy a new application, deploy new versions of an existing application or remove older applications that are no longer used. Python supports performing any of these tasks. The main limit is our imagination. We have full access to the wide variety of Python libraries that are already out there or that we are creating from scratch. The last area we’ll discuss is application scripting. One way to think of application scripting is to think about how we typically think of an application itself. As a user, we typically don’t think of an application as something that can be easily extended by us. The application is exactly what we’re given, no more, no less. But what if a user or developer could write their own code to respond to events that are raised within the application, or, going even further, what if a developer could write their own user interface elements, new screens, new user flows or something else and integrate it directly into the application itself? Not many applications written today take advantage of how powerful a concept this is. Games are one type of application that this is more common, but it’s less common to find this in your typical application outside of that area. But this is exactly what application scripting aims to do, and is one area Python can be used to a powerful degree. You can find it in 2D and 3D modeling software, image manipulation software in the form of different image processing algorithms, photo taking applications in the form of fun overlays over pictures, and other types of applications as well.