Python tutorials

Break Out of Loops With Python’s break Keyword

In Python, the break statement lets you exit a loop prematurely, transferring control to the code that follows the loop. This tutorial guides you through using break in both for and while loops. You’ll also briefly explore the continue keyword, which complements break by skipping the current loop iteration. By the end of this video course, you’ll understand that: A break in Python is a keyword that lets you exit a loop immediately, stopping further iterations. Using break outside of […]

Read more

Quiz: How to Serve a Website With FastAPI Using HTML and Jinja2

Interactive Quiz ⋅ 5 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of building dynamic websites with FastAPI and Jinja2 Templates. By working through this quiz, you’ll revisit how to return HTML with HTMLResponse, serve assets with StaticFiles, render Jinja2 templates with context, and include CSS and JavaScript for interactivity like copying hex color codes. If you are new to FastAPI, review Get Started With FastAPI. You can also brush up on Python functions and HTML and […]

Read more

How to Serve a Website With FastAPI Using HTML and Jinja2

By the end of this guide, you’ll be able to serve dynamic websites from FastAPI endpoints using Jinja2 templates powered by CSS and JavaScript. By leveraging FastAPI’s HTMLResponse, StaticFiles, and Jinja2Templates classes, you’ll use FastAPI like a traditional Python web framework. You’ll start by returning basic HTML from your endpoints, then add Jinja2 templating for dynamic content, and finally create a complete website with external CSS and JavaScript files to copy hex color codes: To follow along, you should be […]

Read more

Python Operators and Expressions

Python operators enable you to perform computations by combining objects and operators into expressions. Understanding Python operators is essential for manipulating data effectively. This video course covers arithmetic, comparison, Boolean, identity, membership, bitwise, concatenation, and repetition operators, along with augmented assignment operators. You’ll also learn how to build expressions using these operators and explore operator precedence to understand the order of operations in complex expressions. By the end of this video course, you’ll understand that: Arithmetic operators perform mathematical calculations […]

Read more

Python 3.14 Released and Other Python News for November 2025

Python 3.14 is out now, bringing t-strings, deferred annotations, better error messages, and plenty more to explore. As developers start adopting the new version, Python 3.15 begins its alpha phase, and Python 3.9 officially retires. Meanwhile, Django 6.0 enters beta, new PEPs propose lazy imports and changes to the assert syntax, and the PSF makes waves with a notable funding decision. Here’s what’s been happening in the world of Python! Python Releases Last month’s headline news was the release of […]

Read more

Quiz: Python MarkItDown: Convert Documents Into LLM-Ready Markdown

Interactive Quiz ⋅ 8 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of the Python MarkItDown: Convert Documents Into LLM-Ready Markdown tutorial. By working through this quiz, you’ll revisit how to install MarkItDown, convert documents to Markdown for your LLM workflows, and more. 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 […]

Read more

Python MarkItDown: Convert Documents Into LLM-Ready Markdown

The MarkItDown library lets you quickly turn PDFs, Office files, images, HTML, audio, and URLs into LLM-ready Markdown. In this tutorial, you’ll compare MarkItDown with Pandoc, run it from the command line, use it in Python code, and integrate conversions into AI-powered workflows. By the end of this tutorial, you’ll understand that: You can install MarkItDown with pip using the [all] specifier to pull in optional dependencies. The CLI’s results can be saved to a file using the -o or […]

Read more

Building UIs in the Terminal With Python Textual

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 video course, you’ll learn how to create, style, and enhance Textual apps with layouts, events, […]

Read more

Quiz: A Close Look at a FastAPI Example Application

Interactive Quiz ⋅ 10 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of the FastAPI example project that can shuffle lists, pick random items, and generate random numbers. By working through this quiz, you’ll revisit how path parameters and type hints enable automatic validation, how request bodies model data, how async endpoints improve performance, and how CORS allows safe cross-origin requests. To go deeper, read A Close Look at a FastAPI Example Application. You can also review […]

Read more

A Close Look at a FastAPI Example Application

Now that you have a working FastAPI application, it’s time to add some functionality to your API. You’ll add endpoints that demonstrate different FastAPI features while creating a randomizer API. Each endpoint you create will showcase a different aspect of FastAPI, from handling dynamic URLs to processing complex request data. Declare Path and Query Parameters With Types FastAPI’s path parameters allow your API to handle dynamic URLs. For your randomizer API, you’ll create an endpoint that generates random numbers within […]

Read more
1 2 3 204