python,不区分大小写进行判断

python,不区分大小写进行判断

string1 = 'Hello'
string2 = 'hello'
if string1.lower() == string2.lower():
            print("The strings are the same (case insensitive)")
else:
            print("The strings are NOT the same (case insensitive)")

  

posted @ 2022-01-05 10:15  语兮  阅读(789)  评论(0)    收藏  举报