+ 3
Cat < dog
if('cat'<'dog'): print("true") why it return true ? how?
8 Answers
+ 7
because ASCII value of 'c' is 3 and and 'd' is 4 ...hence 3<4 ..which is true
+ 3
it compares the ASCII values hence it returns true
+ 1
because ASCII value of 'c' is 3 and and 'd' is 4 ...hence 3<4 ..which is true
0
Apples != Oranges
0
'Apples' != 'Oranges' and 'Apples' < 'Oranges'
It compares the characters of both strings by their ASCII values (might be UTF-8 values)
0
Orange like annoying orange hahahaha
0
thank so if we conditional check 2 character it checks ASCII values and return value
0
I think the problem with the first values