Posts in 2023
-
How to Parse URLs in Python: A Comprehensive Guide with Examples
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 …
Posts in 2022
-
Python: How to print literal curly brace { or } in f-string and format string
in Python
How to print literal curly brace “{” or “}” in f-string and format string. how to escape brace properly in python.
Formatted string literals or f-string was introduced in Python 3.6. 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 …
Posts in 2020
-
Python unicode string lowercase and caseless match
in Python
str.lower()
andstr.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 …