“Python Check String case insensible” Réponses codées

Python String Match Ignore Case

if firstStr.lower() == secStr.lower():
    print('Both Strings are same')
else:
    print('Strings are not same')
Xerothermic Xenomorph

Python Check String case insensible

string1 = 'Hello'
string2 = 'hello'

if string1.casefold() == string2.casefold():
    print("The strings are the same (case insensitive)")
else:
    print("The strings are NOT the same (case insensitive)")
DreamCoder

Python Check String case insensible

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)")
DreamCoder

Réponses similaires à “Python Check String case insensible”

Questions similaires à “Python Check String case insensible”

Plus de réponses similaires à “Python Check String case insensible” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code