Python track

Python interview questions and answers

Panel-ready Python & Django questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.

228 Qs
61 Easy Caching Python

Name a Django cache backend.

Short take

Simple meaning

LocMemCache is an in-process dict, useful for development only.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
62 Easy Celery Python

What is Celery?

Short take

Simple meaning

Celery is a distributed task queue.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
64 Easy itertools Python

What is the itertools module?

Short take

Simple meaning

itertools is a standard-library toolkit of fast, memory-efficient iterators.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
65 Easy itertools Python

What does itertools.count do?

Short take

Simple meaning

count(start=0, step=1) yields an infinite arithmetic sequence.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
66 Easy asyncio Python

What is asyncio?

Short take

Simple meaning

asyncio is Python's built-in library for cooperative concurrent I/O using the event loop.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
67 Easy asyncio Python

What does async def mean?

Short take

Simple meaning

async def defines a coroutine function.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
70 Easy GIL Python

What is the Global Interpreter Lock (GIL)?

Short take

Simple meaning

The GIL is a mutex in CPython that allows only one thread to execute Python bytecode at a time.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
76 Moderate GIL Python

When do threads still help in CPython despite the GIL?

Short take

Simple meaning

Threads help when they spend time in I/O or in C code that releases the GIL, such as reading sockets, waiting on a database driver, or compressing in zlib.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
79 Moderate Decorators Python

How do you write a decorator that accepts arguments?

Short take

Simple meaning

Use a nested factory: the outer function takes decorator arguments and returns the real decorator, which returns the wrapper.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
80 Moderate Decorators Python

How can a class act as a decorator?

Short take

Simple meaning

If a class implements __init__ to receive the function and __call__ to run the wrapper, instances are callable decorators.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
Prev Page 4 of 12 Next
Chat with us