Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python string contains substring ignore case

string1 = "hi"
string2 = "HI"
if string1.lower() == string2.lower():
    print "Equals!"
else:
    print "Different!"
Comment

PREVIOUS NEXT
Code Example
Python :: py quick sort 
Python :: model checkpoint 
Python :: remove key from dictionary python 
Python :: Python Switch case statement by Dictionary Mapping 
Python :: get parent of current directory python 
Python :: print string in reverse order uing for loop python 
Python :: python find closest date 
Python :: docstring in python 
Python :: tensorflow 
Python :: count in python 
Python :: python print bytes 
Python :: is there a null data type in python 
Python :: python global variable unboundlocalerror 
Python :: Counter() Function 
Python :: python get file ending 
Python :: delete file in django terminal 
Python :: split range python 
Python :: binary search in python 
Python :: simple python class 
Python :: how to append data in django queryset 
Python :: |safe django 
Python :: phyton "2.7" print 
Python :: lambda functions python 
Python :: daraja mpesa 
Python :: Set .difference() Operation in python3 
Python :: js choice function 
Python :: python loop until condition met 
Python :: python string: .upper() 
Python :: run only few test cases in pytest 
Python :: is the multiply code in python 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =