Python
We track 512 posts about Python from 36 engineering blogs. Most active: Real Python, Lerner Consulting Blog, Pamela Fox. Latest post: Nov 27, 2026.
Companies writing about Python
- Real Python289
- Lerner Consulting Blog125
- Pamela Fox22
- Microsoft Python Engineering8
- Robin Wilson6
- Twilio6
- Vercel6
- Scrapinghub5
- Abu Ashraf Masnun4
- Nicolas Fränkel4
- Stack Abuse4
- Postmark3
- Soundcloud2
- Honeybadger2
- Facebook2
- Toptal2
- Pulumi2
- Ray Wenderlich2
- Serverless2
- Red Hat1
- Dennis Yurichev1
- Cloudflare1
- SitePoint1
- Benchling1
Recent posts
Quiz: What Are Python Asterisk and Slash Special Parameters For? (opens on the source site)
In this quiz, you’ll test your understanding of What Are Python Asterisk and Slash Special Parameters For?. By working through this quiz, you’ll revisit how the bare asterisk and the slash split a function’s parameters into positional-only, positional-or-keyword, and keyword-only groups. You’ll also review how they relate to *args and how they help you keep your functions backward compatible. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
The Real Python Podcast – Episode #320: Optimizing Python Performance & Building a Django Static Site (opens on the source site)
What goes into moving from profiling the performance of a Python program to optimizing it? What are common techniques you should consider for speeding up your code, and which ones should you avoid? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Quiz: Python Timer Functions: Three Ways to Monitor Your Code (opens on the source site)
In this quiz, you’ll test your understanding of Python Timer Functions: Three Ways to Monitor Your Code. By working through this quiz, you’ll revisit why time.perf_counter() is the go-to clock for timing code and how to wrap a timer in a class, a context manager, and a decorator. You’ll also review timeit and cProfile for benchmarking and profiling your programs. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Do programmers have a future? (opens on the source site)
The short answer: Yes, absolutely. For several decades now, a degree in computer science (or related field) has almost guaranteed employment, with good salaries, excellent benefits, and comfortable working conditions. […] The post Do programmers have a future? appeared first on LernerPython.
Quiz: Python and TOML: Read, Write, and Configure with tomllib (opens on the source site)
In this quiz, you’ll test your understanding of Python and TOML: Read, Write, and Configure with tomllib. By working through this quiz, you’ll revisit TOML syntax, including key-value pairs, tables, arrays, and dates. You’ll also practice loading TOML with tomllib, writing it with tomli_w, and editing existing documents with tomlkit without losing comments or formatting. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
LLM Evaluation in Python: Build an Eval Harness From Scratch (opens on the source site)
You change the system prompt behind an LLM feature, try a few examples, and think you’ve fixed the bug. The new outputs look better when you inspect them manually, so you deploy the change. All is well. That is, until you discover that a separate class of requests has regressed or that responses seem worse on average. This is the problem with making ad hoc prompt changes without systematic LLM evaluation. Ad hoc changes and manual inspection are useful while you’re experimenting, but they don’t give you a repeatable regression signal. You also find it increasingly difficult to distinguish…
pandas Project: Make a Gradebook With Python & pandas (opens on the source site)
One of the jobs that all teachers have in common is evaluating students. Whether you use exams, homework assignments, quizzes, or projects, you usually have to turn students’ scores into a letter grade at the end of the term. This often involves a bunch of calculations that you might do in a spreadsheet. Instead, you can consider using Python and pandas. One problem with using a spreadsheet is that it can be hard to see when you make a mistake in a formula. Maybe you selected the wrong column and put quizzes where exams should go. Maybe you found the maximum of two incorrect values. To solve…
Quiz: LLM Evaluation in Python: Build an Eval Harness From Scratch (opens on the source site)
In this quiz, you’ll test your understanding of LLM Evaluation in Python: Build an Eval Harness From Scratch. By working through this quiz, you’ll revisit how to turn product expectations into explicit criteria, when to use code checks instead of an LLM judge, how to verify a judge’s evidence and calibrate it against human labels, and how a release gate compares two prompt versions. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Python holidays package: Find the date of Thanksgiving (opens on the source site)
Tomorrow is Thanksgiving in the US. Use the “holidays” package to calculate its date in Python: The post Python holidays package: Find the date of Thanksgiving appeared first on LernerPython.
The end of enterprise software — or, a world of custom solutions (opens on the source site)
Let’s say you need a new shirt. In 2026, you have so many options for buying that shirt. You can shop online. You can (horrors!) go into a physical store. […] The post The end of enterprise software — or, a world of custom solutions appeared first on LernerPython.
Build an AI Agent From Scratch in Python (opens on the source site)
You know how LLMs work, and you may already use AI agents to help you write code. However, an agent isn’t an LLM, and an LLM isn’t an agent. What sits between them is the agentic loop. In this video course, you’ll build an AI agent from scratch in Python by writing the harness that turns a language model into an agent. You’ll do this in about 90 lines of code, with no frameworks. By the end of this video course, you’ll understand that: An AI agent is a language model wrapped in a harness, which is a loop that passes information between you, the model, and a set of tools. The Chat Completions…
K-Means Clustering in Python: A Practical Guide (opens on the source site)
The k-means clustering method is an unsupervised machine learning technique used to identify clusters of data objects in a dataset. There are many different types of clustering methods, but k-means is one of the oldest and most approachable. These traits make implementing k-means clustering in Python reasonably straightforward, even for novice programmers and data scientists. If you’re interested in learning how and when to implement k-means clustering in Python, then this is the right place. You’ll walk through an end-to-end example of k-means clustering using Python, from preprocessing the…
Conditional Statements in Python (opens on the source site)
From the previous tutorials in this series, you now have quite a bit of Python code under your belt. Everything you have seen so far has consisted of sequential execution, in which statements are always performed one after the next, in exactly the order specified. But the world is often more complicated than that. Frequently, a program needs to skip over some statements, execute a series of statements repetitively, or choose between alternate sets of statements to execute. That is where control structures come in. A control structure directs the order of execution of the statements in a…
Quiz: Python Conditional Statements (opens on the source site)
Test your understanding of Python conditional statements. Take this quiz after reading our Conditional Statements in Python tutorial. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Python tracebacks with Rich: Colorized output and local variables (opens on the source site)
Want your Python traceback to look nice? Use Rich: Now your tracebacks will be colorized and highlighted, with local variables clearly displayed and set apart (thanks to show_locals=True). The post Python tracebacks with Rich: Colorized output and local variables appeared first on LernerPython.
Top Python Game Engines (opens on the source site)
You can use several Python game engines for crafting video games using your existing Python skills. Popular Python game engines are Pygame, Arcade, and Ren’Py, each offering unique features. In this tutorial, you’ll learn how to install and use them, and how these engines differ from traditional stand-alone game engines. By the end of this tutorial, you’ll understand that: Pygame, Arcade, adventurelib, and Ren’Py are some of the top Python game engines, each with unique features. Python game engines are straightforward to use for Python developers but may require more effort for…
DaisyRose 27B Draws a Python Reading a Book (opens on the source site)
We asked DaisyRose 27B to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run: Watch it draw New here? What the five tasks measureWe use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work: Task What we ask What we read off the answer The snake Write a Python turtle program that draws a python reading…
Python loading spinners with Rich: Using Console.status (opens on the source site)
Is your Python program going to take a while? Use Rich to display animation while waiting: The status marker goes to the left of your text. See “python -m rich.spinner” […] The post Python loading spinners with Rich: Using Console.status appeared first on LernerPython.
Gemini 4 Neon Draws a Python Reading a Book (opens on the source site)
We asked Gemini 4 Neon to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run: Watch it draw New here? What the five tasks measureWe use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work: Task What we ask What we read off the answer The snake Write a Python turtle program that draws a python reading…
Inkling 2 Mini Draws a Python Reading a Book (opens on the source site)
We asked Inkling 2 Mini to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run: Watch it draw New here? What the five tasks measureWe use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work: Task What we ask What we read off the answer The snake Write a Python turtle program that draws a python reading…
Rich tables in Python: Using Table, add_column, and add_row (opens on the source site)
Create beautiful tables in Python with Rich: # call once per column: # print it! The post Rich tables in Python: Using Table, add_column, and add_row appeared first on LernerPython.
How to Refactor Python Code With an AI Agent (opens on the source site)
Say you have a Python project that works, and nobody is filing bug reports for it. However, every change, fix, or new feature takes longer than it should and requires working on multiple files. Also, you try to avoid touching certain files because small changes there break the whole project. That’s called technical debt, and you can pay it down when you refactor Python code with AI. Refactoring improves the code’s structure without changing what it does. This way, the next change will cost less than it would have before refactoring. An AI coding agent can help you pay down technical debt…
How to Use any() in Python (opens on the source site)
As a Python programmer, you’ll frequently deal with Booleans and conditional statements—sometimes very complex ones. In those situations, you may need to rely on tools that can simplify logic and consolidate information. Fortunately, any() in Python is such a tool. It looks through the elements in an iterable and returns a single value indicating whether any element is true in a Boolean context, or truthy. In this tutorial, you’ll learn: How to use any() How to decide between any() and or Let’s dive right in! Python Pit Stop: This tutorial is a quick and practical way to find the info you…
Quiz: Python Practice Problems: Parsing CSV Files (opens on the source site)
In this quiz, you’ll test your understanding of Python Practice Problems: Parsing CSV Files. By working through this quiz, you’ll revisit how csv.DictReader turns rows into dictionaries, how to find a minimum with min() and a key function, how to refactor similar solutions into shared code, and when pandas is worth the extra dependency. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Data Management With Python, SQLite, and SQLAlchemy (opens on the source site)
All programs process data in one form or another, and many need to be able to save and retrieve that data from one invocation to the next. Python, SQLite, and SQLAlchemy give your programs database functionality, allowing you to store data in a single file without the need for a database server. You can achieve similar results using flat files in any number of formats, including CSV, JSON, XML, and even custom formats. Flat files are often human-readable text files—though they can also be binary data—with a structure that can be parsed by a computer program. Below, you’ll explore using SQL…
Hy4 flash Draws a Python Reading a Book (opens on the source site)
We asked Hy4 flash to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run: Watch it draw New here? What the five tasks measureWe use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work: Task What we ask What we read off the answer The snake Write a Python turtle program that draws a python reading a…
Build an AI Agent From Scratch in Python: The Agentic Loop (opens on the source site)
You know how LLMs work, and you may already use AI agents to help you write code. However, an LLM isn’t an agent. What sits between them is the agentic loop. In this tutorial, you’ll build an AI agent from scratch in Python by writing the harness that turns a language model into an agent. You’ll do this in about ninety lines of code, with no frameworks. By the end of this tutorial, you’ll understand that: An AI agent is a language model wrapped in a harness, which is a loop that passes information between you, the model, and a set of tools. The Chat Completions API doesn’t remember earlier…
Quiz: Exploring the Python math Module (opens on the source site)
In this quiz, you’ll test your understanding of Exploring the Python math Module. By working through this quiz, you’ll revisit the constants of the math module, rounding and comparing floats, power, exponential, and logarithmic functions, newer additions like isqrt(), and how math compares with cmath and NumPy. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Rich Console: Set default styles with keyword arguments (opens on the source site)
Pass keyword args to the Python Rich console upon creation for consistent styling: The post Rich Console: Set default styles with keyword arguments appeared first on LernerPython.
GPT-6.2 Astra Draws a Python Reading a Book (opens on the source site)
We asked GPT-6.2 Astra to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run: Watch it drawShow/Hide New here? What the five tasks measureShow/Hide We use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work: Task What we ask What we read off the answer The snake Write a Python turtle program that…
Related topics
This page is generated automatically from the engineering blogs we follow. Every post links to its source, where it was published. See all sources.