python string comparison ignore case code example
Example 1: python string match ignore case
if firstStr.lower() == secStr.lower():
print('Both Strings are same')
else:
print('Strings are not same')
Example 2: python make comparison non case sensitive
mystring = "Hello"
non_case_sensitive_string= mystring.casefold()
#this makes it non-case-sensitive.
#if you want to make it lowercase, use the following:
mystring = "Hello"
lowercase_mystring = mystring.lower()