educative.io

Educative

String print(new_house &gt>= house)

how print(new_house &gt>= house) prints as true ?

as elements in new_house is lesser than elements in house …

It’s not based on the length of the strings. It evaluates to True because ‘S’ comes after ‘G’ in the alphabet. Letters later in the alphabet are considered bigger.

Let me know if this helps!

1 Like

make sense!