Function Details: casefold

Description


Return a casefolded copy of the string.


Extended Description


The casefold() method returns a casefolded copy of the string, which is a more aggressive form of lowercasing. It's primarily used for caseless matching. Casefolding is similar to lowercasing but more thorough, as it's designed to remove all case distinctions in a string. For most use cases, lowercase() is sufficient, but casefold() can be useful when dealing with certain Unicode characters.


Read More about casefold from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Return


Returns a new string with all characters casefolded.


Return Type


str

Output

Explanation

This example demonstrates the basic usage of casefold(). It converts all characters to lowercase.