Python tutorials

uv vs pip: Python Packaging and Dependency Management

When it comes to Python package managers, the choice often comes down to uv vs pip. You may choose pip for out-of-the-box availability, broad compatibility, and reliable ecosystem support. In contrast, uv is worth considering if you prioritize fast installs, reproducible environments, and clean uninstall behavior, or if you want to streamline workflows for new projects. In this video course, you’ll compare both tools. To keep this comparison meaningful, you’ll focus on the overlapping features, primarily package installation and dependency […]

Read more

Quiz: How to Integrate ChatGPT’s API With Python Projects

Interactive Quiz ⋅ 8 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of How to Integrate ChatGPT’s API With Python Projects. By working through this quiz, you’ll revisit how to send prompts with the openai library, guide behavior with developer role messages, and handle text and code outputs. You’ll also see how to integrate AI responses into your Python scripts for practical tasks. The quiz contains 8 questions and there is no time limit. You’ll get 1 […]

Read more

How to Integrate ChatGPT’s API With Python Projects

Python’s openai library provides the tools you need to integrate the ChatGPT API into your Python applications. With it, you can send text prompts to the API and receive AI-generated responses. You can also guide the AI’s behavior with developer role messages and handle both simple text generation and more complex code creation tasks. Here’s an example: Python Script Output from a ChatGPT API Call Using openai After reading this tutorial, you’ll understand how examples like this work under the […]

Read more

Quiz: How to Create a Django Project

Interactive Quiz ⋅ 5 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of creating a Django project. By working through this quiz, you’ll revisit how to create and activate a virtual environment, install Django and pin your dependencies, start a Django project, and start a Django app. You will also see how isolating dependencies helps others reproduce your setup. To revisit and keep learning, watch the video course on How to Set Up a Django Project. The […]

Read more

How to Create a Django Project

Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: How to Set Up a Django Project Before you can start building your Django web application, you need to set up your Django project. In this guide you’ll learn how to create a new Django project in four straightforward steps and only six commands: Step Description Command 1a Set up a virtual environment python […]

Read more

Intro to Object-Oriented Programming (OOP) in Python

Object-oriented programming (OOP) is one of the most significant and essential topics in programming. This course will give you a foundational conceptual understanding of object-oriented programming to help you elevate your Python skills. You’ll learn how to define custom types using classes and how to instantiate those classes into Python objects that can be used throughout your program. Finally, you’ll discover how classes can inherit from one another, with a brief introduction to inheritance, enabling you to write maintainable and […]

Read more

Unit testing your code’s performance, part 1: Big-O scaling

When you implement an algorithm, you also implement tests to make sure the outputs are correct. This can help you: Ensure your code is correct. Catch problems if and when you change it in the future. If you’re trying to make sure your software is fast, or at least doesn’t get slower, automated tests for performance would also be useful. But where should you start? My suggestion: start by testing big-O scaling. It’s a critical aspect of your software’s speed, […]

Read more

Quiz: How to Properly Indent Python Code

Interactive Quiz ⋅ 5 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of How to Indent in Python. By working through this quiz, you’ll revisit how to properly indent Python code, choose helpful editor settings, use spaces properly, apply code formatters, and explain why indentation is required. The quiz contains 5 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. […]

Read more

Quiz: How to Convert Bytes to Strings in Python

Interactive Quiz ⋅ 6 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of the Convert Python Bytes to Strings tutorial. By working through this quiz, you’ll revisit how to decode bytes, choose an encoding, and turn binary data into readable text. You’ll also see how encodings map byte values to characters so you can handle data from files, databases, and APIs with confidence. For a deeper dive, check out Python Encodings: A Guide and Python Bytes. The […]

Read more

How to Build a Personal Python Learning Roadmap

If you want to learn Python or improve your skills, a detailed plan can help you gauge your current status and navigate toward a target goal. This tutorial will help you craft a personal Python learning roadmap so you can track your progress and stay accountable to your goals and timeline: The steps in this tutorial are useful for Python developers and learners of all experience levels. While you may be eager to start learning,    

Read more
1 2 3 207