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 :: how to add value in array django 
Python :: Python Remove Character from String using replace() 
Python :: python clear stdout 
Python :: python tableau 2d 
Python :: a list of keys and a list of values to a dictionary python 
Python :: python dictionary get value if key exists 
Python :: numpy python 3.10 
Python :: django changing boolean field from view 
Python :: reshape (n ) to (n 1) 
Python :: how to pop an exact number from a list in python 
Python :: python get attribute value with name 
Python :: sum of product 1 codechef solution 
Python :: python3 call parent constructor 
Python :: download python libraries offline 
Python :: python regex find 
Python :: cache pyspark 
Python :: python machine learning 
Python :: python create a set of class 
Python :: how to set global variable in python function 
Python :: tuple in python 3 
Python :: for loops python 
Python :: stack adt in python 
Python :: django jsonresponse 
Python :: append more columns into a 2d array 
Python :: how to replace a string in python 
Python :: create new columns pandas from another column 
Python :: long in python 
Python :: python set cookies 
Python :: creating numpy array using empty 
Python :: openpyxl get row from sheet 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =