Python tutorials

Quiz: Python Code Quality: Best Practices and Tools

Interactive Quiz ⋅ 13 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Python Code Quality: Tools & Best Practices. By working through this quiz, you’ll revisit the importance of producing high-quality Python code that’s functional, readable, maintainable, efficient, and secure. You’ll also review how to use tools such as linters, formatters, and profilers to help achieve these qualities. The quiz contains 13 questions and there is no time limit. You’ll get 1 point for each […]

Read more

Python Code Quality: Best Practices and Tools

Producing high-quality Python code involves using appropriate tools and consistently applying best practices. High-quality code is functional, readable, maintainable, efficient, and secure. It adheres to established standards and has excellent documentation. You can achieve these qualities by following best practices such as descriptive naming, consistent coding style, modular design, and robust error handling. To help you with all this, you can use tools such as linters, formatters, and profilers. Read on to learn more about the strategies, tools, and best […]

Read more

Quiz: How to Strip Characters From a Python String

Interactive Quiz ⋅ 8 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Python’s .strip() method. You’ll also revisit the related methods .lstrip() and .rstrip(), as well as .removeprefix() and .removesuffix(). These methods are useful for tasks like cleaning user input, standardizing filenames, and preparing data for storage. 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 […]

Read more

Quiz: Python’s Bytearray

Interactive Quiz ⋅ 11 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of Python’s Bytearray: A Mutable Sequence of Bytes. By working through this quiz, you’ll revisit the key concepts and uses of bytearray in Python. The quiz contains 11 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

LangGraph: Build Stateful AI Agents in Python

LangGraph is a versatile Python library designed for stateful, cyclic, and multi-actor Large Language Model (LLM) applications. LangGraph builds upon its parent library, LangChain, and allows you to build sophisticated workflows that are capable of handling the complexities of real-world LLM applications. Explore the full tutorial to gain hands-on experience with LangGraph, including setting up workflows and building a LangGraph agent that can autonomously parse emails, send emails, and interact with API services. While you’ll get a brief primer on […]

Read more

Using Structural Pattern Matching in Python

Structural pattern matching is a powerful control flow construct invented decades ago that’s traditionally used by compiled languages, especially within the functional programming paradigm. Most mainstream programming languages have since adopted some form of pattern matching, which offers concise and readable syntax while promoting a declarative code style. Although Python was late to join the party, it introduced structural pattern matching in the 3.10 release. In this video course, you’ll: Master the syntax of the match statement and case clauses […]

Read more

Quiz: Introducing DuckDB

Interactive Quiz ⋅ 10 QuestionsBy Ian Eyre Share In this quiz, you’ll test your understanding of the techniques discussed in the Introducing DuckDB tutorial. As you work through the questions, you’ll review your knowledge of DuckDB and build on what you learned in the tutorial. To successfully answer all the questions, you’ll need to do some research outside of the tutorial. Embrace this challenge and allow it to enhance your learning journey. The quiz contains 10 questions and there is […]

Read more

Quiz: LangGraph: Build Stateful AI Agents in Python

Interactive Quiz ⋅ 12 QuestionsBy Martin Breuss Share By working through this quiz, you’ll revisit how to build LLM workflows and agents in LangGraph, and how LangGraph expands upon LangChain’s capabilities. The quiz contains 12 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

Python’s Instance, Class, and Static Methods Demystified

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: OOP Method Types in Python: @classmethod vs @staticmethod vs Instance Methods Instance, class, and static methods each serve a distinct role in Python, and knowing when to use one over another is key to writing clean, maintainable code. Instance methods operate on individual objects using self, while class methods use cls to access class-level […]

Read more

Python Textual: Build Beautiful UIs in the Terminal

Have you ever wanted to create an app with an appealing interface that works in the command line? Welcome to Textual, a Python toolkit and framework for creating beautiful, functional text-based user interface (TUI) applications. The Textual library provides a powerful and flexible framework for building TUIs. It offers a variety of features that allow you to create interactive and engaging console applications. In this tutorial, you’ll learn how to create, style, and enhance Textual apps with layouts, events, and […]

Read more
1 2 3 187