Print("datam" > "datan") How does this code output is False What does it do?

Print("datam" > "datan") How does this code output is False What does it do?
0

How does this code output is False What does it do?
print(“datam” > “datan”)

It will give answer as true or false i.e boolean value…
It will compare the string postition between both the string
For example:- data is same in both, but n comes after m so index value of n is one place greater in english alphabet and thus m>n is false so the whole statemnt will give you a boolean value i.e false, but if the operator “>” would have been replaced by “<” it would have given a True as output.

2 Likes