- Home
- All MCQs
All MCQs with Answers · Page 739
45,334 multiple choice questions from every subject, newest first. Switch on practice mode to hide the answers and test yourself.
Which module encodes data to Base64 in Python?
Which pandas structure is a one-dimensional labelled array in Python?
Which DataFrame method gives summary statistics of numeric columns in Python?
What does the doctest module do in Python?
What is the output of print(int(False)) in Python?
print(int(False))
What is the output of the following Python code snippet?
from dataclasses import dataclass
@dataclass
class P:
x: int
y: int
print(P(1, 2))
@dataclass
class P:
x: int
y: int
print(P(1, 2))
What is the right way to pause inside a coroutine without blocking the event loop in Python?
Which module performs binary search on a sorted list in Python?
What is the output of the following Python code snippet?
from collections import deque
d = deque([1, 2, 3])
d.rotate(1)
print(d)
d = deque([1, 2, 3])
d.rotate(1)
print(d)
Which Python version introduced the match statement?
What does re.match() check in Python?
What is duck typing in Python?
What is the output of the following Python code snippet?
import heapq
print(heapq.nlargest(2, [1, 3, 2]))
print(heapq.nlargest(2, [1, 3, 2]))
What does int | None mean in a type hint (Python 3.10+)?
Which collections type provides O(1) appends and pops from both ends in Python?
What does np.arange(0, 10, 2) produce in Python?
What does PEP stand for in Python?
What is the output of the following Python code snippet?
from decimal import Decimal
print(Decimal('0.1') + Decimal('0.2'))
print(Decimal('0.1') + Decimal('0.2'))
Which sorting algorithm does Python's sorted() use?
What is pyproject.toml used for in Python?
What is the output of print({'a'} <= {'a': 1, 'b': 2}.keys()) in Python?
print({'a'}
What is the output of the following Python code snippet?
d = {'a': 3, 'b': 1, 'c': 2}
print(sorted(d, key=d.get))
print(sorted(d, key=d.get))
What is the output of the following Python code snippet?
class A:
@classmethod
def f(cls): return 'Cls'
print(A.f())
@classmethod
def f(cls): return 'Cls'
print(A.f())