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
84 Moderate Generators Python

What does generator.send() do?

Short take

Simple meaning

send(value) resumes the generator and makes yield return that value inside the function.

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

Read full answer Example · Mistake · Say this
86 Moderate Generators Python

What is yield from used for?

Short take

Simple meaning

yield from subgen delegates iteration to another iterable or generator, forwarding values, send, and throw.

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

Read full answer Example · Mistake · Say this
89 Moderate OOP Python

What are abstract base classes in Python?

Short take

Simple meaning

ABCs, from abc.ABC, let you declare abstract methods that subclasses must implement.

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

Read full answer Example · Mistake · Say this
92 Moderate venv Python

How does venv isolate site-packages?

Short take

Simple meaning

The venv interpreter's sys.prefix points at the env directory, so imports look in venv/lib/site-packages first.

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

Read full answer Example · Mistake · Say this
94 Moderate pip Python

What does pip install -e . do?

Short take

Simple meaning

Editable install links the project into site-packages so code changes apply without reinstalling.

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

Read full answer Example · Mistake · Say this
98 Moderate Django MVT Python

What is a context processor?

Short take

Simple meaning

A context processor is a function that receives the request and returns a dict merged into every template context.

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

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