def mystrcmp(x,y):
print (x.lower(),y.lower())
if(str(x.lower()) == str(y.lower())):
print ("true")
else:
print ("false")
mystrcmp("python", "pTHYON")
This code gives incorrect output, it should give True
but gives False
You Can Use the following script to really get a true
output
def mystrcmp(x,y):
x, y = str(x),str(y)
print(x.lower(),y.lower())
if x.lower() == y.lower():
print ("true")
else:
print ("false")
mystrcmp("python", "pYTHON")
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments