How to compare strings using casefold() in Python

1 Answer

0 votes
s1 = 'PYTHON JAVA C++'
s2 = 'PYTHON java c++'

if s1.casefold() == s2.casefold():
    print('Equal')
else:
    print('Not Equal')


'''
run:

Equal

'''

 



answered Jun 20, 2017 by avibootz

Related questions

1 answer 151 views
1 answer 146 views
1 answer 112 views
4 answers 208 views
208 views asked Apr 13, 2021 by avibootz
1 answer 113 views
...