Answers for "compare string python"

1

ho to compare strings in python

==: This checks whether two strings are equal
!=: This checks if two strings are not equal
<: This checks if the string on its left is smaller than that on its right
<=: This checks if the string on its left is smaller than or equal to that on its right
>: This checks if the string on its left is greater than that on its right
>=: This checks if the string on its left is greater than or equal to that on its right
Posted by: Guest on March-19-2022
0

compare string python

text1 = 'apple'

text2 = 'apple'

text1 == text2

#RETURNS true
Posted by: Guest on March-05-2022

Python Answers by Framework

Browse Popular Code Answers by Language