debugger
answered Aug 14 '21 00:00
we can compare two string by == ,
if both same it will returns True , otherwise False
s='string'
s1='string'
if s==s1 :
print("Both string is same")
else:
print("Provided string is not same")
Check the above example for comparing two strings in Python
we used if else condition