Quiz: Python 3.14 Preview: Better Syntax Error Messages

Interactive Quiz ⋅ 5 QuestionsBy Philipp Acsany Share This quiz helps you get familiar with the upgraded error messages in Python 3.14. You’ll review new keyword typo suggestions, improved math errors, string prefix feedback, and more. Put your understanding to the test and discover how Python’s improved error messages can help you debug code faster. 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, […]

Read more

Python 3.14 Preview: Better Syntax Error Messages

Python 3.14 brings a fresh batch of improvements to error messages that’ll make debugging feel less like detective work and more like having a helpful colleague point out exactly what went wrong. These refinements build on the clearer tracebacks introduced in recent releases and focus on the mistakes Python programmers make most often. By the end of this tutorial, you’ll understand that: Python 3.14’s improved error messages help you debug code more efficiently. There are ten error message enhancements in […]

Read more

Quiz: Modern Python Linting With Ruff

Interactive Quiz ⋅ 9 QuestionsBy Rodrigo Girão Serrão Share Sharpen your code quality workflow with Ruff. In this quiz, you’ll review installation checks, continuous linting, and code formatting. You’ll also revisit selecting rule codes, reading rule docs, applying safe fixes, and configuring TOML files. For a refresher, see Modern Python Linting With Ruff. 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 […]

Read more

Modern Python Linting With Ruff

Linting is essential to writing clean and readable code that you can share with others. A linter, like Ruff, is a tool that analyzes your code and looks for errors, stylistic issues, and suspicious constructs. Linting allows you to address issues and improve your code quality before you commit your code and share it with others. Ruff is a modern linter that’s extremely fast and has a simple interface, making it straightforward to use. It also aims to be a […]

Read more

Quiz: Astral’s ty Type Checker for Python

Interactive Quiz ⋅ 7 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll revisit the key concepts from Astral’s ty: A New Blazing-Fast Type Checker for Python. You’ll check your understanding of installing ty from PyPI, running type checks, and interpreting its structured diagnostics. You’ll also recall how to configure and silence specific rules, limit the scope of checks, and adjust Python version or platform settings. By completing this quiz, you’ll cement your ability to experiment confidently with ty in personal […]

Read more

Astral’s ty: A New Blazing-Fast Type Checker for Python

After Ruff and uv, the Astral team is back with another Rust-based tool called ty, short for type check. This new tool delivers a lightning-fast static type-checking experience in Python, aiming to outpace existing tools in both performance and convenience. By incorporating ty into your daily workflow, you’ll catch type-related bugs earlier and get clearer feedback. But is ty suitable for you? Take a look at the table below to make a quick decision: Use Case Pick ty Pick Other […]

Read more

How to Drop Null Values in pandas With .dropna()

Missing values can derail your analysis. In pandas, you can use the .dropna() method to remove rows or columns containing null values—in other words, missing data—so you can work with clean DataFrames. In this tutorial, you’ll learn how this method’s parameters let you control exactly which data gets removed. As you’ll see, these parameters give you fine-grained control over how much of your data to clean. Dealing with null values is essential for keeping datasets clean and avoiding the issues […]

Read more

Python MCP: Connect Your LLM With the World

The Model Context Protocol (MCP) is a new open protocol that allows AI models to interact with external systems in a standardized, extensible way. In this tutorial, you’ll install MCP, explore its client-server architecture, and work with its core concepts: prompts, resources, and tools. You’ll then build and test a Python MCP server that queries e-commerce data and integrate it with an AI agent in Cursor to see real tool calls in action. By the end of this tutorial, you’ll […]

Read more

Quiz: Strip Characters From a Python String

Interactive Quiz ⋅ 10 QuestionsBy Joseph Peart Share Brush up on how Python’s strip, lstrip, and rstrip string methods work. You’ll practice how to remove whitespace, specific characters, and use the right tool for trimming string ends. Try these questions to check your understanding of default stripping, custom character sets, and the difference between stripping characters and removing sequences. Need a refresher? See Strip Characters From a Python String. The quiz contains 10 questions and there is no time limit. […]

Read more

Strip Characters From a Python String

By default, Python’s .strip() method removes whitespace characters from both ends of a string. To remove different characters, you can pass a string as an argument that specifies a set of characters to remove. The .strip() method is useful for tasks like cleaning user input, standardizing filenames, and preparing data for storage. By the end of this video course, you’ll understand that: The .strip() method removes leading and trailing whitespace but doesn’t remove whitespace from the middle of a string. […]

Read more
1 2 3 4 938