Python

Python: How to extract only tables from raw HTML

Updated: February 14, 2024 By: Guest Contributor

Overview Extracting tables from raw HTML strings can be incredibly useful for data scientists, web developers, and anyone needing to parse and analyze web data. This tutorial will…

Fixing Python NameError – name ‘List’ is not defined

Updated: February 14, 2024 By: Guest Contributor

Understanding the Issue Experiencing a NameError in Python, particularly one that mentions ‘List’ is not defined, can be a stumbling block for both newcomers and experienced developers alike….

Python: Using Type Hints when Handling Exceptions with Try/Catch

Updated: February 14, 2024 By: Guest Contributor

Introduction Python’s type hinting system, introduced in PEP 484, has steadily gained traction for promoting code clarity and aiding in static analysis. While commonly used for variables and…

Python typing.Annotated examples

Updated: February 14, 2024 By: Guest Contributor

Introduction Type checking in Python serves as a syntax for declaring types of variables, function parameters, and return values. It helps in early detection of potential errors, makes…

Python: Search and download photos by keyword from Unsplash API

Updated: February 14, 2024 By: Guest Contributor

Overview Ever stumbled upon the perfect photo on Unsplash for your project or presentation but didn’t know how to automatically retrieve similar ones using code? In this guide,…

Python: Add Type Annotations when Unpacking Tuples

Updated: February 14, 2024 By: Guest Contributor

Introduction In modern Python development, adding type annotations has become increasingly popular for enhancing code readability, maintainability, and leveraging static type checking tools like Mypy. Type annotations add…

Using TypeVar in modern Python: A practical guide

Updated: February 14, 2024 By: Guest Contributor

Overview Type variables in Python, introduced via the TypeVar function, are a significant part of the type hinting system that has been gradually integrated into Python since version…

Recursive Types in Modern Python: A Practical Guide

Updated: February 14, 2024 By: Guest Contributor

Overview Recursive types allow for the definition of data structures that can recursively include instances of themselves. This concept is particularly useful in languages like Python, where the…

Python: Using dependent types for input/return of function

Updated: February 14, 2024 By: Guest Contributor

Introduction In the expanding world of software development, type systems play a crucial role in defining the behavior of variables and functions. Recently, the concept of dependent types…

Python: Using type hints with datetime and timestamp

Updated: February 14, 2024 By: Guest Contributor

Introduction Type hinting in Python is a great feature that came along with Python 3.5 through PEP 484. It allows programmers to explicitly declare the expected data types…

1 2 3 4 5 6 64