- Home
- All MCQs
All MCQs with Answers · Page 741
45,334 multiple choice questions from every subject, newest first. Switch on practice mode to hide the answers and test yourself.
What is the output of print(list(map(str.lower, ['A', 'B', 'C']))) in Python?
print(list(map(str.lower, ['A', 'B', 'C'])))
What does python -m http.server do?
What does deque(maxlen=3) do when a fourth item is appended in Python?
What is the output of the following Python code snippet?
d = {'a': 2, 'b': 1}
print({v: k for k, v in d.items()})
print({v: k for k, v in d.items()})
Which is called first when creating an instance: __new__ or __init__ in Python?
What is a common use of a classmethod in Python?
What is the output of print('abc'[::2]) in Python?
print('abc'[::2])
What is the output of print(10 ** 100 < float('inf')) in Python?
print(10 ** 100
What is the output of the following Python code snippet?
from collections import namedtuple
P = namedtuple('Point', 'x y')
print(P(1, 2))
P = namedtuple('Point', 'x y')
print(P(1, 2))
What is the difference between loc and iloc in pandas in Python?
Which module offers a thread-safe FIFO queue in Python?
What is the output of print('xxhello'.lstrip('x')) in Python?
print('xxhello'.lstrip('x'))
What is the output of print('Programming'[::-1]) in Python?
print('Programming'[::-1])
What is the output of the following Python code snippet?
a = [1, 2, 3, 4]
a[1:3] = [5, 5]
print(a)
a[1:3] = [5, 5]
print(a)
What does the pip freeze command output in Python?
What is the correct order of logging levels from lowest to highest severity in Python?
What is the output of print(list(reversed([3, 2, 1]))) in Python?
print(list(reversed([3, 2, 1])))
What is the output of print(5 ^ 6) in Python?
print(5 ^ 6)
What is the output of the following Python code snippet?
for i in range(5):
pass
print(i)
pass
print(i)
What is the output of print('abc'.isalpha()) in Python?
print('abc'.isalpha())
What is the output of print(f'{0.5:.2%}') in Python?
print(f'{0.5:.2%}')
Which module is used for secure random tokens and passwords in Python?
Which module provides the fast heap-based priority queue in Python?
What is the output of the following Python code snippet?
try:
'1'