Python is the primary language for data engineering, machine learning, and backend development at Indian product companies and startups. Backend engineers at Swiggy, Zomato, and Meesho, and virtually all ML and data science roles across Indian tech are Python-first. This guide covers the Python interview questions asked at Indian product companies across experience levels.
Core Python Fundamentals
Fundamentals tested at every level: Python data types: int, float, str (immutable), list (mutable ordered), tuple (immutable ordered), dict (mutable key-value, ordered since Python 3.7+), set (mutable unordered unique). Mutable vs immutable: lists and dicts are mutable (can be changed in-place), strings and tuples are immutable (operations return new objects). Pass by assignment: Python passes object references. Mutables can be modified inside functions; reassignment does not affect the caller. List vs tuple: use tuples for fixed collections (coordinates, RGB values), lists for dynamic collections. dict.get(key, default) vs dict[key]: get() returns default if key missing; [] raises KeyError. Walrus operator (:=) Python 3.8+: while chunk := f.read(8192).
OOP and Advanced Patterns
OOP in Python: classes, _init, instance vs class variables, @classmethod (receives class, not instance), @staticmethod (no implicit first arg). Dunder methods: str (human-readable), repr (developer-readable, unambiguous), len, getitem, eq. Inheritance: super() to call parent. Multiple inheritance and MRO (Method Resolution Order): C3 linearisation. Property: @property for getter, @setter for setter: controlled attribute access. Decorators: functions that take a function and return a modified function. Used for logging, timing, caching (functools.lrucache), access control. Generator functions: use yield instead of return. Lazy evaluation: produces values on demand. Memory efficient for large sequences. Generator expressions: (x2 for x in range(1000)) vs list comprehension [x2 for x in range(1000)].
Python Interview Patterns
Patterns that appear repeatedly in Python interviews at Indian product companies: Counter from collections: from collections import Counter. Counts hashable objects in one line. Counter(word for word in text.split()). defaultdict: avoids KeyError for missing keys. defaultdict(list) for grouping. heapq: Python min-heap. heapq.nlargest(k, items) for top-k problems. bisect: binary search on sorted lists. sorted() with key: sorted(students, key=lambda s: (-s.grade, s.name)). zip and enumerate: for i, (a, b) in enumerate(zip(list1, list2)). any() and all(): any(x > 0 for x in nums). String methods: join, split, strip, replace, startswith, endswith. f-strings (Python 3.6+): f{name} is faster and cleaner than format() or %.
Async Python and Common Pitfalls
Async Python: asyncio for concurrent I/O-bound operations. async def defines a coroutine. await suspends execution until the awaitable completes. asyncio.gather() runs coroutines concurrently. Used heavily in: web frameworks (FastAPI), high-throughput microservices, data pipelines with concurrent API calls. Python pitfalls tested in interviews: Mutable default arguments: def append(item, lst=[]) is a bug: default list is shared across calls. Use def append(item, lst=None): if lst is None: lst = []. Late binding closures: variables in lambdas are evaluated at call time, not definition time. GIL (Global Interpreter Lock): Python GIL prevents true multi-threading for CPU-bound work. Use multiprocessing for CPU-bound, asyncio/threading for I/O-bound. Memory leaks: circular references with _del_ methods, large lists kept in module scope.
Python interviews reward pattern recognition and clear explanation. Practise articulating your solutions with HireStepX before your next coding round.
Practice freePython Developer Salaries Across Indian Tech Roles
Python salaries in India vary significantly by domain. Backend web engineers using Django or FastAPI earn 8 to 16 LPA at early-stage startups and 20 to 35 LPA at Series B and beyond. Data engineering roles using PySpark and Airflow at companies like Flipkart Commerce or Juspay command 22 to 40 LPA for four to six years of experience. Pure ML engineering with Python expertise at Sarvam AI, Krutrim, or Google India reaches 50 to 90 LPA. Automation and QA engineers scripting in Python earn 6 to 14 LPA. Professionals with strong FastAPI and async Python skills are seeing the steepest salary growth in 2026 driven by the demand for lightweight AI-integrated microservices.
Python Interview Questions at Top Indian Companies
Flipkart's SDE interviews include Python problems on graph traversal and dynamic programming, typically presented on CoderPad with a 45-minute constraint. Swiggy backend interviews ask candidates to design a rate limiter in Python using token bucket logic. Myntra and Nykaa assess Python proficiency through pandas and NumPy manipulation tasks on real-looking product datasets. Zepto frequently asks about Python memory management, specifically garbage collection, reference counting, and how to avoid circular references in long-running services. CRED's engineering interviews include threading versus multiprocessing comparisons. Atlassian India's Python rounds emphasise decorator patterns and metaclass usage, reflecting the complexity of their extensible plugin ecosystems used in Jira and Confluence.
FastAPI and Modern Python Patterns in 2026
FastAPI has become the dominant Python web framework for new services at Indian product companies, overtaking Flask for greenfield projects. Interviewers at companies like Razorpay, Groww, and Smallcase now ask candidates to design dependency injection hierarchies in FastAPI, implement background task processing using Celery with Redis, and handle Pydantic v2 validation models correctly. Understanding asyncio event loops, specifically how to avoid blocking the event loop with synchronous database calls, is a common senior-level question. Python type hinting with generics and Protocol classes is increasingly tested. Candidates should also demonstrate familiarity with uv and pyproject.toml-based project management, as these have replaced pip and requirements.txt in modern Indian engineering teams.
Frequently asked questions
Explore more