Answers for "python make comparison non case sensitive"

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()
Posted by: Guest on February-22-2021

Code answers related to "python make comparison non case sensitive"

Python Answers by Framework

Browse Popular Code Answers by Language