from/prod
← All companies

THE COMPANY INDEX TRACKED BLOG

Real Python

Ideas, decisions, and lessons from the team.

realpython.com (opens on the source site)LinkedIn X
354Posts tracked
14 hours agoLatest publication
29.5Posts / month over the last 12 months

Latest writing

20 of 354 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 ]

Read at the source

Google Sets a Deadline for AI Agents Working in Gmail (opens on the source site)

Real Python AI News · Weekly edition · The week of November 21–27, 2026 Stop Falling Behind on AI. Catch Up in Five Minutes. New models, new prices, new agent tools, all the time. Our new AI newsletter gives you the handful of stories you actually need as a developer. Free, straight from the Real Python team. Get the free roundup We saved your progress from earlier. Start over Leave this field empty New models, new prices, new agent tools, all the time. Our new AI newsletter gives you the handful of stories you actually need as a developer. How often should it land in your inbox? Pick as many…

Read at the source

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 ]

Read at the source

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 ]

Read at the source

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 ]

Read at the source

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…

Read at the source

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…

Read at the source

The No AI Slop Manifesto: A Pledge to Own What Agents Ship (opens on the source site)

The No AI Slop Manifesto is a short statement from the speakers and attendees of the AIE Code Summit 2026. It defines AI slop and commits everyone who signs it to owning the work they ship with AI. Here, you’ll find out what it says, why it appeared right now, and what it means for your own AI-assisted code. By the end of this tutorial, you’ll understand that: Slop is work that took less effort to produce than it asks its reader to spend understanding it. The manifesto argues that AI makes producing code nearly free, while reviewing it costs as much as ever. AI-generated code turns into slop…

Read at the source

Quiz: The No AI Slop Manifesto: A Pledge to Own What Agents Ship (opens on the source site)

In this quiz, you’ll test your understanding of The No AI Slop Manifesto: A Pledge to Own What Agents Ship. By working through this quiz, you’ll revisit how the manifesto defines slop, why producing work got cheaper than reviewing it, and what owning AI-generated code means in practice. You’ll also check which problems linters and type checkers catch, why slop compounds in a codebase, and what critics dispute. [ 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 ]

Read at the source

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 ]

Read at the source

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…

Read at the source

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…

Read at the source

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…

Read at the source

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 ]

Read at the source

Quiz: Plotting Declarative Charts With Altair (opens on the source site)

In this quiz, you’ll test your understanding of Plotting Declarative Charts With Altair. By working through this quiz, you’ll revisit the difference between declarative and imperative charts, the data, mark, and encoding components of an Altair chart, faceting, interactive selections, linked charts, and exporting your charts to HTML. [ 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 ]

Read at the source

LangChain Tutorial: From Prompts to RAG and AI Agents (opens on the source site)

LangChain is a framework for Python and JavaScript that lets you build applications powered by large language models (LLMs). Sending a single prompt to a model takes only a couple of lines of code. However, real apps also need reusable instructions, access to your own data, and a way for the model to call your Python code. In this tutorial, you’ll explore how LangChain’s Python library handles each of these. Say a group of hospitals just handed you a spreadsheet full of patient reviews, together with a short request: Find out what patients are saying about us. You could read through every row…

Read at the source

Quiz: LangChain Tutorial: From Prompts to RAG and AI Agents (opens on the source site)

In this quiz, you’ll test your understanding of LangChain Tutorial: From Prompts to RAG and AI Agents. You’ll revisit how to steer a chat model with system and human messages, build reusable prompt templates, and chain steps together with the LangChain Expression Language (LCEL). You’ll also review how RAG grounds answers in your own data and how a tool-calling agent decides which functions to run. To go further, check out the LLM Application Development With Python learning path. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every…

Read at the source

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…

Read at the source

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…

Read at the source

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…

Read at the source

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.