Category: Python
Python tutorials
How to Properly Indent Python Code
Knowing how to properly indent Python code is a key skill for becoming an accomplished Python developer. Beginning Python programmers know that indentation is required, but learning to indent code so it’s readable, syntactically correct, and easy to maintain is a skill that takes practice. By the end of this tutorial, you’ll know: How to properly indent Python code in a variety of editors How your choice of editor can impact your Python code How to indent code using spaces […]
Read moreQuiz: Build a Python MCP Client to Test Servers From Your Terminal
Interactive Quiz ⋅ 5 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of how to Build a Python MCP Client to Test Servers From Your Terminal. By working through this quiz, you’ll revisit how to add a minimal chat interface, create an AI handler to power the chat, handle runtime errors, and update the entry point to run the chat from the command line. You will confirm when to initialize the AI handler and how to […]
Read moreBuild a Python MCP Client to Test Servers From Your Terminal
Building an MCP client in Python can be a good option when you’re coding MCP servers and want a quick way to test them. In this step-by-step project, you’ll build a minimal MCP client for the command line. It’ll be able to connect to an MCP server through the standard input/output (stdio) transport, list the server’s capabilities, and use the server’s tools to feed an AI-powered chat. By the end of this tutorial, you’ll understand that: You can build an […]
Read moreBreak 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 moreQuiz: 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 moreHow 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 morePython 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 morePython 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 moreQuiz: 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