VOOZH about

URL: https://thenewstack.io/an-introduction-to-python-for-non-programmers/

⇱ An Introduction to Python for Non-Programmers - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-11-16 03:00:05
An Introduction to Python for Non-Programmers
tutorial,
Python / Software Development

An Introduction to Python for Non-Programmers

This introduction to Python will be the first in a series of tutorials on how to us ethe programming language.
Nov 16th, 2021 3:00am by Jack Wallen
👁 Featued image for: An Introduction to Python for Non-Programmers

Welcome to the first entry in this Python for non-programmers series.

If you’re reading this, you probably have developed a curiosity about programming and are looking for a good place to start. I have good news for you. Python is one of the best languages with which to start that journey. Why? We’ll get into that in a minute. But first, let’s discover exactly what this language is and can do.

Python is what’s called a high-level, general-purpose programming language. Let’s break that definition down.

First, what is a high-level language? Let’s consider this:

At the bottom, you have the computer hardware, which only understands what’s called “machine language.” Because machine language (or machine code) is so close to the hardware, it’s considered a low-level language (because it exists at such a low level).

As you rise up away from the low level, languages become high-level, because they are abstracted away from the hardware. High-level languages do not need to view or access the details of the computer. If they did, they’d be considerably harder to use.

High-level languages:

  • Are programmer-friendly and easier to understand.
  • Are less memory efficient.
  • Are easier to debug.
  • Are relatively easy to maintain.
  • Are portable (so they can run on any supporting platform)
  • Require a compiler or interpreter.
  • Are widely used.

So Python being a high-level language already gives it a head start on user-friendliness.

Our next definition is general purpose. A general-purpose language is a computer language that is used to solve a wide variety of problems. In other words, you can use a general-purpose language for many things.

Put those two things together and Python is a programming language that can be easily used for several purposes. But Python isn’t just easy to use because it’s a high-level language.

What Makes Python so Easy to Use?

One of the main reasons why Python is so easy to use is because it reads almost like the English language. Python has a very clear and simple-to-understand syntax that is used for web developers, desktop developers, game developers, data scientists, and more. With Python so widely-used, it has a very large community, so help is never far away.

So, Python is easy to read, used everywhere, and has a vast community for support. In fact, of all the programming languages, Python is almost always considered the easiest to learn.

The picture is becoming clearer and clearer.

With all of that said, let’s introduce ourselves to Python.

Interpreted Language

Another thing that sets Python apart from a number of other languages is that it’s an interpreted language. This means Python doesn’t need a compiler, so you write the code and run it. Now, that also means you must have Python installed. If you didn’t have python installed, if you created the file hello-newstack.py, it would be of no use. However, with Python installed, you could create the file, add the code, and run it (without having to first compile it).

Let’s walk through this very simple example.

Hello, New Stack!

One of the most widely-used examples (for nearly any programming language) is the Hello, World! example. This simple application does one thing — it prints out a line of text in the terminal. To do that, Python uses what’s called a function, which is a set of instructions that has been previously bundled together that achieve a specific outcome. This means the programmer doesn’t have to create everything.

Let me explain that a bit more simply. Let’s take Legos. When you buy a set of Legos, it’ll come with a bunch of bricks that you can use to form objects. But within that kit, you’ll also find special pieces that can be used to build particular things. For example, you’ll find heads, hands, torsos, arms, and legs which make it easy to build Lego people. Imagine how much more time it would take if you had to build those people out of the included Lego bricks. Not only would it be more challenging, but the people also wouldn’t look as much like people (and more like blocky robots).

Think of those special “people parts” as functions. You could also consider specialized pieces that make it easier to build cars, planes, rockets, or the International Space Station as functions.

Back to our example.

With the Hello, World application, we only need to make use of one function, print(), which tells the interpreter to print out what’s housed between the (). So with our Hello, New Stack example, that function would be used like so:

print('Hello, New Stack!')

That’s a line of Python code. More to the point, that’s the only line of Python code you need for the Hello, World example. Of course, good developers also document their code, so instead of just adding that one line, we’d preface it with something like:

#Print out the text "Hello, New Stack!".

Let’s put that together. Open a terminal window and create the new file with the command:

nano hello-newstack.py

In that file, paste the following:

#Print out the text "Hello, New Stack!".
print('Hello, New Stack!')

Save and close the file with the [Ctrl]+[x] keyboard shortcut.

Remember when I said a python file (a file that ends with .py) isn’t any good without Python installed? Let’s install it. I’ll demonstrate on Ubuntu Linux 20.04. Back at the terminal window issue the command:

sudo apt-get install python3 -y

Now we can actually run our new Python application with the command:

python3 hello-newstack.py

The output of the command will simply print Hello, New Stack! (Figure 1).

👁 Image

Figure 1: Our new Python application successfully ran!

Congratulations, you’ve taken your first steps with Python, and you did so without having to know anything about computer programming. In the next entry of this series, we’ll learn a bit more about the language and how to create an application that’s a bit more complicated.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.