4 Réponses
+ 2
It depends where you are using it. If you used it in an if statement, the code within would not execute.
Example
if 'ten' == 'six':
print("True")
else:
print('False')
Your output, if just ran as a line of code would output as False.
>>> 'ten' == 'six'
False
+ 2
Yes it works. comparing Strings gives you a boolean statement of True or False.
+ 2
but how does the compare happen in a sys s/w perspective ? or in-terms of a h/w processor ?
0
it compares the ASCII codes