/ QUESTION BANK

Real questions. From real interviews.

Filter by track, sub-track, difficulty and company. Click any question to start a mock.

65 questions· BackendPage 1 of 2
MediumPythonbackend

What is the walrus operator (`:=`) and when would you use it?

What is the walrus operator (`:=`) and when would you use it?

MediumPythonbackend

What is structural pattern matching (`match`/`case`), introduced in Python 3.10?

What is structural pattern matching (`match`/`case`), introduced in Python 3.10?

MediumPythonbackend

What are dataclasses, and what problem do they solve?

What are dataclasses, and what problem do they solve?

MediumPythonbackend

What are type hints in Python, and are they enforced at runtime?

What are type hints in Python, and are they enforced at runtime?

MediumPythonbackend

How do you read a large file line by line without loading it entirely into memory?

How do you read a large file line by line without loading it entirely into memory?

EasyPythonbackend

What is the difference between `json.dumps`/`json.loads` and `pickle.dumps`/`pickle.loads`?

What is the difference between `json.dumps`/`json.loads` and `pickle.dumps`/`pickle.loads`?

MediumPythonbackend

How do you convert a list of strings into a single comma-separated string, and back?

How do you convert a list of strings into a single comma-separated string, and back?

MediumPythonbackend

How do you check if a string contains only digits, or only alphabetic characters?

How do you check if a string contains only digits, or only alphabetic characters?

MediumPythonbackend

What is memoization, and how can you implement it in Python?

What is memoization, and how can you implement it in Python?

MediumPythonbackend

What is the difference between `@staticmethod` and a module-level function?

What is the difference between `@staticmethod` and a module-level function?

MediumPythonbackend

What does the `functools.reduce` function do? Provide an example.

What does the `functools.reduce` function do? Provide an example.

MediumPythonbackend

What is the difference between `sort()` and `sorted()`?

What is the difference between `sort()` and `sorted()`?

HardPythonbackend

What is a race condition? Provide an example.

What is a race condition? Provide an example.

HardPythonbackend

What is a `Barrier` in threading?

What is a `Barrier` in threading?

MediumPythonbackend

What is a `Condition` object in threading, and how is it used?

What is a `Condition` object in threading, and how is it used?

MediumPythonbackend

How can you share data between threads?

How can you share data between threads?

HardPythonbackend

What is a deadlock and how can you avoid it?

What is a deadlock and how can you avoid it?

HardPythonbackend

What is a `Semaphore`, and how can it be useful in threading?

What is a `Semaphore`, and how can it be useful in threading?

HardPythonbackend

What's the difference between a `Thread` and a `ThreadPoolExecutor` in Python?

What's the difference between a `Thread` and a `ThreadPoolExecutor` in Python?

MediumPythonbackend

How can you ensure thread-safety when accessing shared resources in Python?

How can you ensure thread-safety when accessing shared resources in Python?

HardPythonbackend

What is the difference between a thread and a coroutine?

What is the difference between a thread and a coroutine?

MediumPythonbackend

What does the `async` keyword do in Python?

What does the `async` keyword do in Python?

EasyPythonbackend

How can you set a breakpoint in your code to aid debugging?

How can you set a breakpoint in your code to aid debugging?

EasyPythonbackend

What is `unittest` in Python?

What is `unittest` in Python?

MediumPythonbackend

How can you create a basic route in Django?

How can you create a basic route in Django?

MediumPythonbackend

What is Flask?

What is Flask?

EasyPythonbackend

What are virtual environments in Python, and why are they useful?

What are virtual environments in Python, and why are they useful?

EasyPythonbackend

What is `NumPy` and when might you use it?

What is `NumPy` and when might you use it?

MediumPythonbackend

What is the difference between a list and a dictionary?

What is the difference between a list and a dictionary?

MediumPythonbackend

How can you implement a stack in Python?

How can you implement a stack in Python?

MediumPythonbackend

How can you achieve multi-level inheritance in Python?

How can you achieve multi-level inheritance in Python?

MediumPythonbackend

How can you implement method overloading in Python?

How can you implement method overloading in Python?

MediumPythonbackend

What is the `__str__` method in a class and when is it used?

What is the `__str__` method in a class and when is it used?

MediumPythonbackend

What is the `super()` function, and why might you use it?

What is the `super()` function, and why might you use it?

MediumPythonbackend

How can you achieve inheritance in Python?

How can you achieve inheritance in Python?

MediumPythonbackend

How can you catch multiple exceptions in a single line?

How can you catch multiple exceptions in a single line?

HardPythonbackend

What are Python descriptors?

What are Python descriptors?

MediumPythonbackend

How can you run Python code in parallel?

How can you run Python code in parallel?

HardPythonbackend

What is the purpose of the `__slots__` attribute in a Python class?

What is the purpose of the `__slots__` attribute in a Python class?

HardPythonbackend

How can you make an immutable class in Python?

How can you make an immutable class in Python?

HardPythonbackend

What is the difference between `asyncio` and multi-threading?

What is the difference between `asyncio` and multi-threading?

MediumPythonbackend

What does the `@property` decorator do in Python?

What does the `@property` decorator do in Python?

MediumPythonbackend

How can you merge two dictionaries?

How can you merge two dictionaries?

MediumPythonbackend

What does the `zip` function do in Python?

What does the `zip` function do in Python?

MediumPythonbackend

How can you dynamically create a new class at runtime?

How can you dynamically create a new class at runtime?

MediumPythonbackend

How does the `map` function work in Python?

How does the `map` function work in Python?

MediumPythonbackend

What is the difference between an `Iterable` and an `Iterator`?

What is the difference between an `Iterable` and an `Iterator`?

MediumPythonbackend

What is the difference between `__new__` and `__init__` in a class?

What is the difference between `__new__` and `__init__` in a class?

EasyPythonbackend

How do you retrieve all the keys, values, and items from a dictionary?

How do you retrieve all the keys, values, and items from a dictionary?

MediumPythonbackend

What is the purpose of the `pass` statement in Python?

What is the purpose of the `pass` statement in Python?