Python Programming - MCQ Practice Questions
Core Python MCQs — syntax, data types, OOP, libraries for placements & IT exams.
119 questions | 100% Free
Q.41Medium
Consider: a = 'Hello'; b = 'Hello'. Are a and b the same object?
Q.42Medium
Consider the code: def func(x, y=5): return x + y. What is func(3)?
Q.43Medium
Consider: x = [1, 2, 3, 4, 5]; y = x[1:4]. What is y?
Q.44Medium
Consider: d = {'a': 1, 'b': 2}; d['c'] = 3. What is d?
Q.45Medium
Consider the code: x = (1, 2, 3); x[0] = 5. What happens?
Q.46Medium
What is the output of: print(None == False)?
Q.47Medium
Consider the following code snippet: python x = [1, 2, 3] y = x y.append(4) print(x) What will be the output?