Python tutorials

A Guide to Modern Python String Formatting Tools

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: Formatting Python Strings When working with strings in Python, you may need to interpolate values into your string and format these values to create new strings dynamically. In modern Python, you have f-strings and the .format() method to approach the tasks of interpolating and formatting strings. To get the most out of this tutorial, […]

Read more

Differences Between Python’s Mutable and Immutable Types

As a Python developer, you’ll have to deal with mutable and immutable objects sooner or later. Mutable objects are those that allow you to change their value or data in place without affecting the object’s identity. In contrast, immutable objects don’t allow this kind of operation. You’ll just have the option of creating new objects of the same type with different values. In Python, mutability is a characteristic that may profoundly influence your decision when choosing which data type to […]

Read more

Python 3.13: Cool New Features for You to Try

Python 3.13 will be published on October 1, 2024. This new version is a major step forward for the language, although several of the biggest changes are happening under the hood and won’t be immediately visible to you. In a sense, Python 3.13 is laying the groundwork for some future improvements, especially to the language’s performance. As you read on, you’ll learn more about the background for this and dive into some new features that are fully available now. In […]

Read more

Quiz: Python 3.13: Free Threading and a JIT Compiler

Interactive Quiz ⋅ 16 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of the new features in Python 3.13. By working through this quiz, you’ll revisit how to compile a custom Python build, disable the Global Interpreter Lock (GIL), enable the Just-In-Time (JIT) compiler, determine the availability of new features at runtime, assess the performance improvements in Python 3.13, and make a C extension module targeting Python’s new ABI. The quiz contains 16 questions and there is […]

Read more

Quiz: Python 3.13: Cool New Features for You to Try

Interactive Quiz ⋅ 9 QuestionsBy Geir Arne Hjelle Share In this quiz, you’ll test your understanding of Python 3.13: Cool New Features for You to Try. By working through this quiz, you’ll review the key updates and improvements in this version of Python. 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 100%. Good luck! […]

Read more

Quiz: Syntactic Sugar: Why Python Is Sweet and Pythonic

Interactive Quiz ⋅ 10 QuestionsBy Leodanis Pozo Ramos Share Test your understanding of Python’s most common pieces of syntactic sugar and how they make your code more Pythonic and readable. Take this quiz after reading our Syntactic Sugar: Why Python is Sweet and Pythonic tutorial. The quiz contains 10 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%. […]

Read more

Python 3.13 Preview: A Modern REPL

One of Python’s strong points is its interactive capabilities. By running python you start the interactive interpreter, or REPL, which allows you to perform quick calculations or explore and experiment with your code. In Python 3.13, the interactive interpreter has been completely redesigned with new modern features. Python’s REPL has remained largely unchanged for decades. Instead, alternative interpreters like IPython, bpython, and ptpython have addressed some of the built-in REPL’s shortcomings, providing more convenient interactive workflows for developers. As you’re […]

Read more

Advanced Python import Techniques

In Python, you use the import keyword to make code in one module available in another. Imports in Python are important for structuring your code effectively. Using imports properly will make you more productive, allowing you to reuse code while keeping your projects maintainable. This video course provides a comprehensive overview of Python’s import statement and how it works. The import system is powerful, and this course will teach you how to harness this power. While you’ll cover many of […]

Read more

Quiz: Using Python’s pip to Manage Your Projects’ Dependencies

Interactive Quiz ⋅ 8 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of Python’s standard package manager, pip. You’ll revisit the concepts behind pip, important commands, and how to install packages. The quiz contains 8 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! « Browse All Python Quizzes    

Read more

Python 3.13 Preview: Free Threading and a JIT Compiler

Although the final release of Python 3.13 is scheduled for October 2024, you can download and install a preview version today to explore the new features. Notably, the introduction of free threading and a just-in-time (JIT) compiler are among the most exciting enhancements, both designed to give your code a significant performance boost. Check out what’s new in the Python changelog for a complete list of the upcoming features and improvements. This document contains a quick summary of the release […]

Read more
1 5 6 7 8 9 182