Python String Casefold() Method
Python Casefold() method returns a lowercase copy of the string. It is more simillar to lowercase method except it revomes all case distinctions present in the string.
For example in German, 'β' is equivelent to "ss". Since it is already in lowercase, lowercase do nothing and prints 'β' whereas casefold converts it to "ss".
No parameter is required.
It returns lowercase string.
This function was introduced in Python 3.3.
Python String Casefold() Method Example 1
Old value: JAVATPOINT New value: javatpoint
Python String Casefold() Method Example 2
The strength of casefold, it not only converts into lowercase but also converts strictly. See an example below 'β' is converted into "ss".
Old value: JAVATPOINT - β New value: javatpoint ? ss
Python String Casefold() Method Example 3
If string is in camelcase, it still converts whole string into lowercase.
Old value: JaVaTpOiNt New value: javatpoint
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week