Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

check if 2 strings are equal python

str1 == str2
# return True if the strings are equals. Case sensitive !
str1 = "python"
str2 = "python"
str1 == str2 # True

str1 = "python"
str2 = "javascript"
str1 == str2 # False

str1 = "python"
str2 = "PYTHON"
str1 == str2 # False
Comment

How to check if two strings are same in Python

# Program to check the email and re-enterd email is same or different
email= "info@itsmycode.com"
confirmemail="INFO@ITSMYCODE.COM"

if(email.lower() == confirmemail.lower()):
    print("Email Address are same")
else:
    print("Email Address are not same")
Comment

PREVIOUS NEXT
Code Example
Python :: get min of list python 
Python :: turn numpy function into tensorflow 
Python :: add new column of dataframe 
Python :: python array append array 
Python :: how to connect mongodb database with python 
Python :: if queryset is empty django 
Python :: invalid literal for int() with base 10 in python 
Python :: oops python 
Python :: pandas sum 
Python :: dockerfile example 
Python :: python double underscore methods 
Python :: unittest 
Python :: import from parent module package python 
Python :: simulation? 
Python :: rstrip python3 
Python :: python3 
Python :: facet grid, barplot, catplot 
Python :: InsertionSort 
Python :: python pprint on file 
Python :: supercharged python 
Python :: Add one to a column pands 
Python :: summary r language equivalent in python 
Python :: flask int route 
Python :: convolutional layer of model architecture pass input_shape 
Python :: python multiply numbers nested list 
Python :: xmgrace conditions 
Python :: make n copies of item in list 
Python :: capitalise.texts 
Python :: <function chr(i, /)> error in python 
Python :: find mising number in O(n) 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =