QuestionQ95

Miscellaneous (List Comprehensions, Lambdas, Closures, I/O)

Which of the following expressions evaluate to True?

Choose two
  • A '1' + '1' + '1' < '1' * 3'
  • B 121 + 1 != '1' + 2 * '2'
  • C 'AbC'.lower() < 'AB'
  • D '3.14' != str(3.1415)
Explanation

121 + 1 evaluates to the integer 122, whereas '1' + 2 * '2' evaluates to the string '122'; an integer and a string are not equal. Also, str(3.1415) produces '3.1415', which is different from '3.14'.

Community Discussion

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