Python tutorials

Quiz: Python while Loops: Repeating Tasks Conditionally

Interactive Quiz ⋅ 11 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Python while Loops: Repeating Tasks Conditionally. The while keyword is used to initiate a loop that repeats a block of code while a condition is true. A while loop works by evaluating a condition at the start of each iteration. If the condition is true, then the loop executes. Otherwise, it terminates. The quiz contains 11 questions and there is no time limit. […]

Read more

Quiz: Python Bytes

Interactive Quiz ⋅ 15 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of Bytes Objects: Handling Binary Data in Python. By working through this quiz, you’ll revisit the key concepts related to this low-level data type. The quiz contains 15 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 100%. Good luck! Related Resources

Read more

Quiz: How to Work With Polars LazyFrames

Interactive Quiz ⋅ 10 QuestionsBy Ian Eyre Share In this quiz, you’ll test your understanding of the techniques covered in How to Work With Polars LazyFrames. By working through the questions, you’ll review your understanding of why LazyFrames are an efficient and preferred way of working in 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 there […]

Read more

How to Work With Polars LazyFrames

A Polars LazyFrame provides an efficient way to handle large datasets through lazy evaluation. Unlike traditional DataFrames, LazyFrames don’t contain data but instead store a set of instructions known as a query plan. Query plans perform operations like predicate and projection pushdown, ensuring only necessary rows and columns are processed. LazyFrames also support the parallel execution of query plans, further enhancing performance. By the end of this tutorial, you’ll understand that: A Polars LazyFrame allows efficient data processing by storing […]

Read more

Single and Double Underscore Naming Conventions in Python

Python has a few important naming conventions that are based on using either a single or double underscore character (_). These conventions allow you to differentiate between public and non-public names in APIs, write safe classes for subclassing purposes, avoid name clashes, and more. Following and respecting these conventions allows you to write code that looks Pythonic and consistent in the eyes of other Python developers. This skill is especially useful when you’re writing code that’s intended for other developers […]

Read more

How to Use sorted() and .sort() in Python

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: Sorting Data With Python Sorting in Python is a fundamental task that you can accomplish using sorted() and .sort(). The sorted() function returns a new sorted list from the elements of any iterable, without modifying the original iterable. On the other hand, the .sort() method modifies a list in place and doesn’t return a […]

Read more

Quiz: How to Use sorted() and .sort() in Python

Interactive Quiz ⋅ 7 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of sorting in Python. By working through this quiz, you’ll revisit how to sort various types of data in different data structures, customize the order, and work with two different ways of sorting in 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 score. […]

Read more

How to Manage Python Projects With pyproject.toml

The pyproject.toml file simplifies Python project configuration by unifying package setup, managing dependencies, and streamlining builds. In this tutorial, you’ll learn how it can improve your day-to-day Python setup by exploring its key use cases, like configuring your build system, installing packages locally, handling dependencies, and publishing to PyPI. By the end of this tutorial, you’ll understand that: pyproject.toml is a key component for defining a Python project’s build system, specifying requirements and the build backend. Dependencies and optional dependencies […]

Read more

Concatenating Strings in Python Efficiently

Python string concatenation is a fundamental operation that combines multiple strings into a single string. In Python, you can concatenate strings using the + operator or append them with +=. For more efficient concatenation, especially when working with lists of strings, the .join() method is recommended. Other techniques include using StringIO for large datasets and the print() function for quick screen output. By the end of this video course, you’ll understand that you can: Concatenate strings in Python using the […]

Read more

Python News Roundup: February 2025

The new year has brought a flurry of activity to the Python community. New bugfix releases of Python 3.12 and 3.13 show that the developers seemingly never sleep. A new type of interpreter is slated for the upcoming Python 3.14 as part of ongoing efforts to improve Python’s performance. Poetry takes a giant leap toward compatibilty with other project management tools with the release of version 2. If you’re interested in challenging yourself with some programming puzzles, check out the […]

Read more
1 4 5 6 7 8 190