casefold in python

Solutions on MaxInterview for casefold in python by the best coders in the world

showing results for - "casefold in python"
Lukas
01 Apr 2017
1s1 = 'ß'
2s2 = 'ss'
3s3 = 'SS'
4if s1.casefold() == s2.casefold():
5    print('Casefolded strings of s1 and s2 are equal')
6else:
7    print('Casefolded strings of s1 and s2 are not equal')
8 
9if s1.casefold() == s3.casefold():
10    print('Casefolded strings of s1 and s3 are equal')
11
Ismail
25 Sep 2019
1my_str = "Hello from AskPython"
2 
3casefolded_str = my_str.casefold()
4 
5print(casefolded_str)
6
Maja
09 Aug 2019
1string = "PYTHON IS AWESOME"
2# casefold is used to lowercase the string
3# print lowercase string
4print("Lowercase string:", string.casefold())