QuestionQ99

VerifiedStrings

Which of these expressions evaluate to True?

Choose two
Explanation

'xYz'.lower() returns 'xyz'; string comparisons are lexicographic and case-sensitive, making it greater than 'XY'. In the other true expression, 2 * '2' produces '22', which concatenates with '1' to make '122'; int('122') is 122, equal to 121 + 1.

Community Discussion

No comments yet. Be the first to start the discussion!