Site icon i2tutorials

Casefold() method in Python String Module

Casefold() method in Python String Module

Casefold method converts the caseless strings i.e if there are any alphabets that are in uppercase in the middle of the letter it converts into casefold strings i.e. it converts those into lower cases by matching of all the alphabets in the string.


Syntax:

str.casefold()

This method does not hold any parameters.


Example:

Let us try the casefold() method

text= 'KiDS friendly attraCtIons'
x= text.casefold()
print(x)


Output:

Exit mobile version