Check out our 3-Day Full-Time HTML & CSS Online Live Masterclass for RM300 / USD75 Only!

What is Python?

Python is a very versatile programming language and has various use cases. Learn more about what can Python do!

Matt Cross
April 28, 2020

python logo grey background

It is a type of snake... It is also currently the fastest growing major programming language, standing in second place as the most loved language [According to the stackoverflow Developer Survey 2019].

  • Why is Python called Python?
  • What is the main use of Python?
  • What is Python and how does it work?
  • What companies use Python?
  • What are the other uses for Python?
  • See some Python Code

Why is Python called Python?

It was named by its creator, Guido van Rossum, after the popular TV show Monty Python. Some say that the creator named it after the popular TV show as he intended for it to be a popular language too [he has managed to achieve this]. However, the true reasons are relatively unknown.

Python has grown over the years, making it one of the most versatile languages around. Its readable syntax, vibrant community and comprehensive frameworks are just some of the reasons why learning Python first would be a good start for you.

What is the main use of Python?

Python is a very versatile language and has various use cases, part of this is due to the ever growing number of libraries available within the Python community. Be it a core library built into the Python language, or community built library there is usually always a package to fulfil any need in programming with Python.

Python is great for web development, having frameworks such as Django and Flask make development time rapid and applications can be up and running in just a short amount of time.

The language is also very popular for its Data Science capability. The core libraries NumPy and SciPy, as well as Matplotlib make it easy for data scientists to work with their data to make conclusive findings.

Machine Learning, Artificial Intelligence and Deep Learning are also made very accessible with libraries such as TensorFlow [Google] and PyTorch [Facebook] being built by some of the most reputable software companies in the world.

Python is great for web development, having frameworks such as Django and Flask make development time rapid and applications can be up and running in just a short amount of time.

In the world of finance & investment, people utilize Python to build algorithm trading bots, do calculations on stock value, risk and more.

What is Python and how does it work?

Python is an interpreted, high-level, general-purpose programming language that emphasizes on code readability.

Even as a beginner, due to its syntax resembling the English language, you can read through Python code and make some sense of what is going on. It also forces you to write neat code right from the get go and this is an exceptionally useful habit to get into for beginners.

Your computer, however, doesn't understand Python. Python language uses interpreters, just like you do as human when you don't understand another language, to translate it.

When the code is run, these interpreters will check the syntax, make sure it is all understandable and will then convert it to something that a computer can understand and execute. It is all rather smart.

Python is one of the most beginner friendly programming languages which kids can pick up.

netflix, google, instagram, dropbox logo with grey background

What companies use Python?

There are many companies out there that use Python as a language to write their code. There are companies you will have never heard of using Python, but there are some big players that you will be very familiar with that use Python.

Google uses Python in their codebase, alongside C++, Java and Golang, it is one a few languages they recognize and support as an official language. Some of the Google developers actively contribute to the Python language and have even built TensorFlow, a very popular deep learning neural network library for Python.

Netflix is another company that relies heavily on Python for their server side code. They mainly use Python for their Data Analysis and for Security Management.

Instagram's servers are built on the Django framework and boast 800 million monthly active users. They choose Python due to its simplicity and practicality which aligns well with the Instagram philosophy, "do the simple thing first".

Other noteable companies that use Python are, Spotify, Dropbox, Uber and even reddit.

While Apple's operating systems on their computers are great for software development and even come pre-shipped with Python. Apple do not use the Python language, they have their own programming language Swift which powers all of the operating systems and applications that ship with their devices.

What are the other uses for Python?

One of the more common questions asked is, can Python be used for hacking?

The simple answer is yes.

Python is a great language for hacking, its ease of learning for beginners, readability and available libraries make it the choice of language for hackers. It is primarily used by Ethical Hackers to expose bugs in code and test security features in websites as well as personal computers.

IoT [Internet of Things] devices are becoming increasingly popular. Devices like the Raspberry Pi are capable of being powered by just a simple phone charging powerbank. They have operating systems running on them just like a normal computer and Python code can be written to output electrical signals from the pins. Meaning you can control a whole host of electrical components with Python code. The devices are being used for fleet management in bus and truck companies as well as for home DIY'ers. There are endless things you can create with IoT devices and most of them are controlled by Python code.

Here is a good list of how people use Python in creating games, IoT, data science and more.

See some Python Code

As an added bonus.

Here is some Python code to look at, it replicates the Magic 8-ball. Ask a question and it will give you an answer.

{% c-block language="py" %}
import sys
import random

question = ''

while not question == 'exit':
   question = input(
       "Ask the magic 8 ball a question: (type 'exit' to quit) ")

   answers = ["Outlook good", "You may rely on it", "Ask again later",
              "Concentrate and ask again", "Reply hazy, try again", "My reply is no", "My sources say no"]

   answer_choice = random.randint(0, 6)

   if question == "":
       print('Hmmmm, you may have forgotten to ask a question')

   elif question == 'exit':
       sys.exit()

   else:
       reply = answers[answer_choice]
       print('Your question: ' + question)
       print(reply)
{% c-block-end %}

Copy and paste the code into repl.it, choose the Python programming language. Run the code!

This code is still rather complex, no worries if you don't understand it now. You start with some simple Python basics!

In a nutshell

There will be a lot of discussions on which programming langauge is best or how to learn faster. Do check out the key considerations you can put in mind when you start learning to code.

Now, if you want to learn more about Python, check out our All about Python Programming.

Ready to learn?

Let's go
a photo of a small valley at night