/ QUESTION BANK
Filter by track, sub-track, difficulty and company. Click any question to start a mock.
What is the walrus operator (`:=`) and when would you use it?
What is structural pattern matching (`match`/`case`), introduced in Python 3.10?
What are dataclasses, and what problem do they solve?
What are type hints in Python, and are they enforced at runtime?
How do you read a large file line by line without loading it entirely into memory?
What is the difference between `json.dumps`/`json.loads` and `pickle.dumps`/`pickle.loads`?
How do you convert a list of strings into a single comma-separated string, and back?
How do you check if a string contains only digits, or only alphabetic characters?
What is memoization, and how can you implement it in Python?
What is the difference between `@staticmethod` and a module-level function?
What does the `functools.reduce` function do? Provide an example.
What is the difference between `sort()` and `sorted()`?
What is a race condition? Provide an example.
What is a `Barrier` in threading?
What is a `Condition` object in threading, and how is it used?
How can you share data between threads?
What is a deadlock and how can you avoid it?
What is a `Semaphore`, and how can it be useful in threading?
What's the difference between a `Thread` and a `ThreadPoolExecutor` in Python?
How can you ensure thread-safety when accessing shared resources in Python?
What is the difference between a thread and a coroutine?
What does the `async` keyword do in Python?
How can you set a breakpoint in your code to aid debugging?
What is `unittest` in Python?
How can you create a basic route in Django?
What is Flask?
What are virtual environments in Python, and why are they useful?
What is `NumPy` and when might you use it?
What is the difference between a list and a dictionary?
How can you implement a stack in Python?
How can you achieve multi-level inheritance in Python?
How can you implement method overloading in Python?
What is the `__str__` method in a class and when is it used?
What is the `super()` function, and why might you use it?
How can you achieve inheritance in Python?
How can you catch multiple exceptions in a single line?
What are Python descriptors?
How can you run Python code in parallel?
What is the purpose of the `__slots__` attribute in a Python class?
How can you make an immutable class in Python?
What is the difference between `asyncio` and multi-threading?
What does the `@property` decorator do in Python?
How can you merge two dictionaries?
What does the `zip` function do in Python?
How can you dynamically create a new class at runtime?
How does the `map` function work in Python?
What is the difference between an `Iterable` and an `Iterator`?
What is the difference between `__new__` and `__init__` in a class?
How do you retrieve all the keys, values, and items from a dictionary?
What is the purpose of the `pass` statement in Python?