Why can't we use relational operator with two strings while making a conditional statement ? (In Python 3x) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why can't we use relational operator with two strings while making a conditional statement ? (In Python 3x)

30th Aug 2021, 1:20 PM
Piyush Chaudhary
Piyush Chaudhary - avatar
2 Answers
+ 5
if im not sure if this is what you are referring to, but im pretty sure you can in python 3x i found this on the geeksforgeeks website. print("Geek" == "Geek") print("Geek" < "geek") print("Geek" > "geek") print("Geek" != "Geek") Output: True True False False
30th Aug 2021, 2:14 PM
you are smart. you are brave.
you are smart. you are brave. - avatar
+ 3
Can you give an example?
30th Aug 2021, 1:23 PM
Lisa
Lisa - avatar