RSS

Posts in 2024

Posts in 2023

  • How to Parse URLs in Python: A Comprehensive Guide with Examples

    Last Update: in Python

    How to Parse URLs in Python: A Comprehensive Guide with Examples

    Parsing URLs (Uniform Resource Locators) is a common task in web development and data processing. URLs are the addresses that identify resources on the internet, such as web pages, images, and documents. Python provides powerful libraries and tools …

    Read more

Posts in 2022

  • Python: How to print literal curly brace { or } in f-string and format string

    Last Update: in Python

    How to print literal curly brace “{” or “}” in f-string and format string. how to escape brace properly in python.

    A formatted string literal or f-string is a string literal that is prefixed with ‘f’ or ‘F’. These strings may contain replacement fields, which are expressions delimited by curly braces {}. While other string literals always …

    Read more

Posts in 2020

  • Python unicode string lowercase and caseless match

    in Python

    str.lower() and str.casefold()

    str.lower() and str.casefold() Starting with Python 3.0, strings are stored as Unicode. Python defined to two functions str.lower() and str.casefold() can be used to convert string to lowercase: str.lower() Return a copy of the string with all the …

    Read more