Basics of Python – Multiple Choice Questions (MCQs)
-
-
62. What is the output of `print(3 in [1, 2, 3])`?
-
63. What is the output of `print('a' in 'banana')`?
-
64. What is the output of `print('key' in {'key': 1, 'value': 2})`?
-
65. What is the purpose of the `not in` operator in Python?
-
66. What is the output of `print(4 not in [1, 2, 3])`?
-
67. What is the output of `print('z' not in 'banana')`?
-
68. What is the output of `print('code' not in {'key': 'code', 'value': 2})`?
-
69. What is the purpose of the `isinstance()` function in Python?
-
70. What is the output of `print(isinstance(5, int))`?
-
71. What is the output of `print(isinstance(5.0, float))`?
-
72. What is the output of `print(isinstance('hello', str))`?