Helping Python developers build with AI: apps, agents, models, and AI-assisted coding. Expert-reviewed tutorials and courses, read by 1M+ developers a month.
Win three years of Real Python, plus all four of our Python books.
That's our Black Friday giveaway. Entering is free, you just need a free Real Python account.
Entries close Friday, November 27.
https://t.co/O8x6UHV53D
Nuitka compiles your Python code instead of bundling it.
So when is PyInstaller still the better pick? This quiz checks if you know.
https://t.co/8hfh88pX4H
Count the numbers in a sorted list between 3 and 5.
count_between([1, 3, 3, 5, 8], 3, 5) should return 3.
Can you do it without checking every item?
https://t.co/vBWSEjWiq3
Writing the same steps twice? Give them a name.
That's a Python function. You write it once with def and run it whenever you want.
https://t.co/BlEJnMzuqH
Has a bigger context window fixed any of these? The tutorial says it only delays them.
It also has a one-sentence prompt for a plan.md that survives /compact.
https://t.co/a9Wye1XV0K
Your AI coding agent forgot the "use uv" rule you gave it. The context window is usually to blame.
5 failures and a fix for each:
1. It forgets your rules
2. It calls a function it made up
3. It reruns a failing test
4. It picks the wrong MCP tool
5. Two rules disagree
🧵
5. AGENTS.md says uv. A line in your Makefile says pip. The agent picks one at random.
Keep a single source of truth in your instruction file, and keep that file short. With thirty rules in it, the agent tends to ignore any single one.
The grand prize in our Black Friday giveaway isn't the only one.
Runners-up can win half off an annual Real Python membership, and that price stays for as long as they remain members.
Entering is free with a Real Python account.
https://t.co/ONpg8yfEPe
Call Claude from Python in under a minute. Install the anthropic package, set your API key, call one method.
The Using the Claude API in Python video course then covers system prompts and structured JSON output with Pydantic.
https://t.co/KubyeORXl4
Stuck between tutorials and your own projects?
One person wins three years of Real Python's courses, exercises and weekly live Office Hours. Entering is free with a Real Python account.
https://t.co/vcdf22Cn3y
Quiz: why does a mutable default argument cause bugs? And why is "is None" the right way to check for None?
Test yourself. The quiz also covers how Mentor AI, Real Python's AI learning assistant, helps you get unstuck.
https://t.co/sw44mupDQr
Would you hand your everyday Python work to a model that costs under a cent for all five tasks?
The write-up has the full turtle script, the stash tool, the --ext diff and every reply.
https://t.co/Yu6dcJCY7K
Every model gets the same prompt: "Write a Python turtle program that draws a python reading a book."
Hy4 flash wrote 276 lines and gave its snake round glasses and a book titled "Python".
Here's how it did on the other everyday Python tasks 🧵
4. Cost and time
Hy4 flash finished all five tasks in 4 min 24 s, and the API billed $0.007 in total.
The stash tool took the biggest share: 2 min 24 s and $0.004.