Python: The Language That Turns AI Thinking into Action

Learning tech speak

Like many people, I grew up watching Monty Python sketches and movies. It’s easy to forget that many of the sketches on the weekly TV series were not that funny; but a few were absolute corkers and deserve the adoration they still receive.

The origins of Python

However, who knew that the deliberately crazy name that Cleese and co cooked up for their wacky comedy series would end up inspiring the name for a coding language that powers much of our digital world. Because that, apparently, is the story.

It’s a quirky story — but it also opens the door to something more interesting: how this one language came to underpin much of the technology that powers AI today.

So, how did Python go from being part of the title for a BBC comedy series to the name of a much-used coding language?  What it is Python? What does it do? And why is it so popular?

The beginnings of Python

We need to go back in time. Christmas break 1989. Guido van Rossom, a Dutch programmer, decided to create a programming language that would:

  • be easy to read (even for non-programmers)
  • be flexible and powerful, and
  • encourage clear thinking and collaboration.

As a fan of Monty Python’s Flying Circus (and I’m guessing with a bit of dry Dutch humour in the mix), he decided to call the language Python. The first version was released in February 1991.

Easy to understand. Easy to use

Before I started writing this post, I hadn’t really paid any attention to the detail of Python code. I’d glanced at a few pieces of code written in Python. I knew of its existence. I knew it was widely used.

But like most people who are not coders, the idea of diving into the detail of a programming language didn’t exactly make my heart sing. So, it was with a bit of trepidation that I started this week’s post.

Anyway, it turns out, I probably shouldn’t have been so worried. Although it is still a programming language, as the introductory story illustrates, it is intended to be easy to use and easy to understand.

What Python is and what it does

Over time, Python has become the operational engine behind many of the apps and automations we use daily — and it’s particularly central to the working of AI.

So, what is it exactly?

It’s probably helpful to answer this question in the context of the other elements of the ‘golden triangle’ that I’ve written about over the last couple of weeks.

If you’ve read my other posts, you’ll remember that Markdown is about how information looks and is presented. JSON is about how information is stored and exchanged. Python is really about what happens to the information. By which I mean, Python is about getting things done.

A Python example

Here’s a really simple example of Python getting something done. It uses a piece of information we are all familiar with – a shopping list.

For a bit of fun, take a look at the example below and see if you can work out what the Python code does:

shopping_list = [“bread”, “milk”, “bananas”]

for item in shopping_list:

    print (“Don’t forget to buy”, item)

Without knowing any code, you may have been able to work out that it prints the 3 items in the list, with an opening reminder of, “Don’t forget to buy…”

Why its popularity?

Python has come a long way since Christmas break 1989. With good reason. That simple readability that you can see in the example above is one of the reasons Python has become so popular.

There’s another reason, too. Over the years, there’s been a mix of coding-community enthusiasm for Python, government funding and corporate backing. All of these factors have contributed in different ways to the growth of what are known as data libraries. These libraries provide coders with pre-built packages of code that save everyone a great deal of time and effort. Each library focuses on a specific area or function of Python.

Like so much in the tech world, the libraries have weird and wonderful names. My particular favourite is NumPy! This is actually short for Numerical Python which, as the name suggests is all about using Python to work with numbers and do mathematical calculations.

It’s like the hands of the GPT…

So, in conclusion, when a GPT does something like produce a chart or a graph, analyse a spreadsheet or put the contents of your chat thread into a Word file for download, it’s Python that’s working away in the background to make this happen.

You could think of the GPT as the brainpower and Python as the hands – the mechanism that actually carries out the work.

Next time you see a GPT doing something clever, remember — it’s Python quietly getting the job done behind the scenes

I’m going to write one more post on Python for next week, which looks at the data libraries in more detail and how they came to be.

Until next time…

 

PS If you don’t know me already, I’m Andrew Jackson, co-founder of Pacific Blue Solutions and founder of Pacific Blue AI. I’m using this Diary to document my journey to create a simple, usable app – PerformaGo – that makes it easy for L&D professionals (or anyone else who teaches something) to create AI-powered performance support GPTs for their learners.

My Most Recent Diary Entries...

Diary Entries from the Last 3 Months...