Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python check string case insensitive

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

how to make a string case insensitive in python

if thing.lower() == "text":
Comment

python contains string case insensitive

>>> str = "Messi is the best SoCceR player"
>>> "soccer" in str.lower()
True
>>> "football" in str
False
Comment

python check string case insensitive

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

PREVIOUS NEXT
Code Example
Python :: radix sort in python 
Python :: logging - multiple log file 
Python :: ComplexWarning: Casting complex values to real discards the imaginary part 
Python :: how to use pafy 
Python :: async sleep python 
Python :: python check if array is subset of another 
Python :: python add field to dictionary 
Python :: django migrate not creating tables 
Python :: copy website 
Python :: pandas make new dataframe 
Python :: replace values in a column by condition python 
Python :: how to use global variable in python 
Python :: python web parse 
Python :: how to play mp3 files using vlc python library 
Python :: concatenate int to string python 
Python :: remove item from list python 
Python :: count item in list python 
Python :: no module named pyinstaller 
Python :: python find smallest value in 2d list 
Python :: python slicing nested list 
Python :: Python remove punctuation from a string 
Python :: import get_object_or_404 
Python :: convert pdf to csv python 
Python :: python rdp server 
Python :: python update 
Python :: heatmap of pandas dataframe with seaborn 
Python :: python run exe 
Python :: current date and time into timestamp 
Python :: sciket learn imputer code 
Python :: how to convert boolean type list to integer 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =