Python tutorials

Nested Loops in Python

Nested loops in Python allow you to place one loop inside another, enabling you to perform repeated actions over multiple sequences. Understanding nested loops helps you write more efficient code, manage complex data structures, and avoid common pitfalls such as poor readability and performance issues. By the end of this tutorial, you’ll understand that: Nested loops in Python involve placing one loop inside another, enabling iteration over multiple sequences or repeated actions. Situations where nested loops are a good idea […]

Read more

First Steps With LangChain

You’ve likely interacted with large language models (LLMs), like the ones behind OpenAI’s ChatGPT, and experienced their remarkable ability to answer questions, summarize documents, write code, and much more. While LLMs are remarkable by themselves, with a little programming knowledge, you can leverage libraries like LangChain to create your own LLM-powered applications that can do just about anything. In this video course, you’ll learn how to: Use LangChain to build LLM-powered applications Create reusable instructions with prompt templates Create and […]

Read more

Quiz: How to Group Data Using Polars .group_by()

Interactive Quiz ⋅ 10 QuestionsBy Ian Eyre Share In this quiz, you’ll test your understanding of the techniques covered in How to Group Data Using Polars .group_by(). By working through the questions, you’ll review your understanding of how to use the data aggregation and grouping techniques provided by Polars. You’ll need to do some research outside of the tutorial to answer all the questions, so let this challenge take you on a learning journey. The quiz contains 10 questions and […]

Read more

How to Group Data Using Polars .group_by()

One of the most common tasks you’ll encounter when analyzing Polars data is the need to summarize it. You can use the Polars .group_by() method to create groupings based on column values. A related summarization technique is aggregation, where you take a sequence of related values and condense them into a single value. By the end of this tutorial, you’ll understand that: You can summarize data using aggregation. You can use .filter() to view specific data. Using .group_by() allows you […]

Read more

Quiz: Getting Started With Python IDLE

Interactive Quiz ⋅ 7 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of Python IDLE. Python IDLE is an IDE included with Python installations, designed for basic editing, execution, and debugging of Python code. You can also customize IDLE to make it a useful tool for writing Python. The quiz contains 7 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 […]

Read more

Working With Missing Data in Polars

Efficiently handling missing data in Polars is essential for keeping your datasets clean during analysis. Polars provides powerful tools to identify, replace, and remove null values, ensuring seamless data processing. This video course covers practical techniques for managing missing data and highlights Polars’ capabilities to enhance your data analysis workflow. By following along, you’ll gain hands-on experience with these techniques and learn how to ensure your datasets are accurate and reliable. By the end of this video course, you’ll understand […]

Read more

Python’s T-Strings Coming Soon and Other Python News for May 2025

Welcome to the May 2025 edition of the Python news roundup. Last month brought confirmation that Python will have the eagerly-awaited template strings, or t-strings, included in the next release. You’ll also read about other key developments in Python’s evolution from the past month, updates from the Django world, and exciting announcements from the community around upcoming conferences. From new PEPs and alpha releases to major framework updates, here’s what’s been happening in the world of Python. PEP 750: Template […]

Read more

Quiz: Python Logging With the Loguru Library

Interactive Quiz ⋅ 9 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of How to Use Loguru for Simpler Python Logging. By working through this quiz, you’ll revisit key concepts like installing Loguru, basic logging, formatting, sinks, log rotation, and capturing exception information. The quiz contains 9 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. The maximum score is […]

Read more

How to Use Loguru for Simpler Python Logging

In Python, logging is a vital programming practice that helps you track, understand, and debug your application’s behavior. Loguru is a Python library that provides simpler, more intuitive logging compared to Python’s built-in logging module. Good logging gives you insights into your program’s execution, helps you diagnose issues, and provides valuable information about your application’s health in production. Without proper logging, you risk missing critical errors, spending countless hours debugging blind spots, and potentially undermining your project’s overall stability. After […]

Read more

How to Copy Objects in Python: Shallow vs Deep Copy Explained

When working with Python objects, you’ll often need to make copies rather than modify the originals. In this tutorial, you’ll explore various ways to copy objects in Python, including using the built-in copy module. You’ll also learn the key differences between shallow and deep copies, with practical examples so you can safely duplicate objects in your own code. Explore the nuances of copying objects in Python and learn how to apply these techniques to manage mutable data structures effectively. Getting […]

Read more
1 2 3 4 5 193