Answers for "python syntax is not case-sensitive"

5

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

Python Answers by Framework

Browse Popular Code Answers by Language