📜  python 使比较不区分大小写 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:29.074000             🧑  作者: Mango

代码示例1
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()