Advertisements
Advertisements
Question
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print('Bye' == 'BYE')
Short/Brief Note
Advertisements
Solution
print('Bye' == 'BYE')
As Python compares string character to character and when different characters are found then their Unicode value is compared. The character with a lower Unicode value is considered to be smaller. Here, 'y' has Unicode 121 and 'Y' has 89. Therefore, the output will be 'False'.
shaalaa.com
Is there an error in this question or solution?
