casefold()

All String methods
casefold()
Returns the string with all chars in lower case.
my_str="Welcome to Plus2net Python"
print(my_str.casefold())
Output is here
welcome to plus2net python
We can user lower() method also to change all chars to lower case but casefold() is more powerful. This can be used for string case insensitive comparison when other than plain english text are used.

casefold() and lower() difference

my_str="aBcßeF"
print(my_str.casefold())
print(my_str.lower())
Output is here
abcssef
abcßef


All String methods


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer