Question Bank

1899 approved questions from the community

Python 3.13 introduced an experimental JIT compiler that can transform bytecode sequences directly into machine code.

MEDIUM
TRUE FALSE
30s
Python
by Mohamed

What is the difference between an iterator and a generator in Python?

MEDIUM
SINGLE CHOICE
40s
Python
by Mohamed

What is the primary difference between a list and an array in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What is the difference between shallow copy and deep copy in Python?

MEDIUM
SINGLE CHOICE
40s
Python
by Mohamed

What does the filter() function do in Python?

MEDIUM
SINGLE CHOICE
30s
Python
by Mohamed

What is sys.getrefcount() used for in Python?

MEDIUM
SINGLE CHOICE
30s
Python
by Mohamed

Which of the following are valid use cases for monkey patching? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
45s
Python
by Mohamed

Which of the following are context managers commonly used for in Python? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
45s
Python
by Mohamed

Which of the following are types of namespaces in Python? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
Python
by Mohamed

What is an abstract class in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What does the map() function return in Python 3?

MEDIUM
SINGLE CHOICE
30s
Python
by Mohamed

What is the best practice for concatenating a large number of strings in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What is the Global Interpreter Lock (GIL) in Python?

MEDIUM
SINGLE CHOICE
40s
Python
by Mohamed

What is the key difference between @staticmethod and @classmethod in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What is monkey patching in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What does Python's 'pass-by-assignment' (pass-by-object-reference) mean?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What is the key advantage of using a memoryview object in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What optimization technique does the Python compiler use when it encounters an expression like '15 * 20' in the source code?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What is a generator function in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

List comprehensions are generally faster than equivalent for loops in Python.

MEDIUM
TRUE FALSE
25s
Python
by Mohamed
PreviousPage 59 of 95Next