+ 5
How to make python case insensitive
Suppose we have a variable of value "variable". We have to make it case insensitive so that the input can equal the value in any case.Like in this example pls hlp https://code.sololearn.com/c5gZqTsBcGOp/?ref=app
5 Antworten
+ 20
First watch this Video:
https://www.bing.com/videos/search?q=how+to+make+JUMP_LINK__&&__python__&&__JUMP_LINK+case+insensitive&qpvt=how+to+make+python+case+insensitive&view=detail&mid=59BEBF5235B1BD7AA73C59BEBF5235B1BD7AA73C&&FORM=VRDGAR
Second, Assuming ASCII strings:
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)"
SOURCE: https://stackoverflow.com/questions/319426/how-do-i-do-a-case-insensitive-string-comparison
+ 19
GodOfPC 611 most welcome bro 💙
Good luck 😉💚
+ 8
Rahul George : since there exists a challenge for it:
casefold() as a further opportunity
+ 7
Thanks Baraa AB I got the point , pretty easy though😁👍
words will remain same in lowercase So it can be case insensitive 👏
+ 5
You could possibly make use of the "your string".upper(), " your string".lower() or "your string". title() functions...
https://www.google.co.in/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/q/27770573&ved=2ahUKEwjdmImT9OjaAhWMKo8KHSuOAiEQFjADegQIBRAB&usg=AOvVaw3z5hbCWYsUF5HOewPIzNl1