I’d been writing Python for a couple of years before async programming made sense to me. I understood the general idea, but the syntax just never felt like Python. Why would calling a function with () not run it, and what exactly was I supposed to await?
Eventually I made progress through a long Mentor AI conversation, so that’s how this tutorial works, too. Instead of reading about async Python, you’ll learn it in conversation with your mentor. The interactions show you different ways to use the mentor, and I hope you’ll add learning through conversation to your toolkit.
Mentor AI is Real Python’s AI learning assistant, and it’s part of a Real Python membership. It knows Real Python’s content and what you’ve been learning on the site. You’ll find the Mentor AI orb in the corner of every page, and clicking it starts a conversation. You need to be signed in to use it. If you’re not a member yet, then you can start a free 7-day trial.
You can do everything in this tutorial right in the chat, because the mentor can run Python code for you. If you have Python installed, running the examples yourself is a nice bonus, but it’s optional.
Usually, this is where I’d list what you’ll learn. This time, you can ask your mentor instead:
Want to know what’s ahead?
Free Kit: Click here to get the Learn With Mentor AI Kit with cheat sheets, a video course, and a quiz that help you learn faster with your mentor and build the Python skills employers look for.
Take the Quiz: Test your knowledge with our interactive “Learn With Mentor AI: A Guided Journey Through Async Python” quiz. You’ll receive a score upon completion to help you track your learning progress:
Interactive Quiz
Learn With Mentor AI: A Guided Journey Through Async PythonPractice learning async Python with Mentor AI. Check how coroutines, await, and the event loop work, and how to steer your mentor.
Tell Your Mentor Where You’re Starting From
The mentor already knows which tutorials, courses, exercises, and quizzes you’ve worked through on Real Python, but it can’t know how you feel about a topic. Sharing that can help your mentor shape a good explanation. I started by explaining my struggles with async programming.
Note: You can click the microphone (dictate) button in any mentor conversation and speak your thoughts directly into the chat:

This is often the quickest way to explain what you’d like to convey.
Press the button below, then edit the message until it’s true for you. Or clear the prefilled text and simply speak your mind:
Keep the bit at the end, where you ask the mentor to ask you questions first. You decide how every mentor conversation goes, so steer it in whatever direction helps you most.
Most of the mentor buttons in this tutorial add to the conversation you already have open, so you can work through the tutorial in one chat. The Give a short answer button in the next section is the exception: it starts a fresh conversation. If you close a conversation, you can pick it up again from your conversation history.
Ask for Shorter, Simpler, or Different Answers
In my conversation, the mentor caught a mistake in my very first message! I’d written that I wanted things to run in parallel, and it pointed out that this isn’t what asyncio does. Depending on how you edited your message, your mentor may or may not have flagged the same thing. Either way, you’ll want to get these two terms straight before anything else. So go ahead and .
If the answer you get is longer than you’d like, then say so. The mentor adjusts the length, depth, and format of its answers when you ask, and asking early saves you a lot of scrolling later on:
Read the full article at https://realpython.com/learn-with-mentor-ai-async-python/ »
[ 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 ]