InterviewEra.com

AI-powered mock interviews and resume-aware scoring — built for Indian campus and early-career hiring. Now in private beta.

Start Mock Interview
Secure payments via Razorpay

Tools

  • Question Generator
  • ATS Resume Checker
  • STAR Builder

Interview Questions

  • Software Engineer Questions
  • TCS Interview Questions
  • React Interview Questions

Resources

  • Blog
  • Placement Guide
  • STAR Method Guide

Company

  • About
  • Pricing
  • Contact

© 2026 InterviewEra.com. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›TCS›Python Dev

TCS · engineering

TCS Python Developer Interview Questions 2026

Preparation guide for Python Developer positions at Tata Consultancy Services. Covers their Online Test (NQT) → Technical → HR process with technical, behavioral, and HR questions.

Interview rounds
3
Avg. package
3.5–7 LPA
Role type
engineering

TCS Python Developer Interview Questions

Placement-oriented · Updated 2026
  1. 01

    What is the difference between a list and a tuple in Python?

    TechnicalEasy

    Tip: Lists are mutable, tuples are immutable. Tuples are faster and can be used as dictionary keys. Use tuples for fixed collections (coordinates, RGB), lists for data that changes.

  2. 02

    What is the Global Interpreter Lock (GIL) in Python? How does it affect concurrency?

    TechnicalMedium

    Tip: The GIL is a mutex that prevents multiple native threads from executing Python bytecode simultaneously, so threads cannot achieve true CPU parallelism in CPython. Workaround: use multiprocessing for CPU-bound tasks, asyncio for I/O-bound tasks.

  3. 03

    Explain Python decorators. Write a simple logging decorator.

    TechnicalMedium

    Tip: A decorator is a function that wraps another function to add behaviour without modifying it. Pattern: `def log(func): def wrapper(*args, **kwargs): print(func.__name__); return func(*args, **kwargs); return wrapper`. Use `functools.wraps` to preserve metadata.

  4. 04

    What are Python generators? How do they differ from regular functions returning a list?

    TechnicalMedium

    Tip: Generators use `yield` and are lazy — they produce one value at a time, keeping only the current state in memory. A function returning a list loads all values at once. Use generators for large datasets, infinite sequences, or pipelines.

  5. 05

    What is the difference between `@staticmethod` and `@classmethod` in Python?

    TechnicalMedium

    Tip: `@staticmethod` takes no implicit first argument — just a regular function namespaced in a class. `@classmethod` takes `cls` as first arg — it can access class state and is used for factory methods. Instance method takes `self` and can access both instance and class.

  6. 06

    How does Django's ORM work? What is the N+1 problem in Django and how do you fix it?

    TechnicalHard

    Tip: Django ORM maps model classes to DB tables. N+1: querying related objects in a loop triggers one query per object. Fix with `select_related()` for ForeignKey (JOIN) or `prefetch_related()` for ManyToMany. Always check the Django debug toolbar query count.

  7. 07

    What is a virtual environment in Python and why is it required?

    TechnicalEasy

    Tip: A virtual environment isolates project dependencies so two projects can use different versions of the same package without conflict. Create with `python -m venv .venv`, activate, then `pip install`. Always commit `requirements.txt` or `pyproject.toml`.

  8. 08

    Describe a Python script or service you built that solved a real business problem.

    BehavioralMedium

    Tip: Quantify impact: "reduced report generation from 4 hours to 10 minutes." Mention libraries used, edge cases you handled, and how you tested it. Avoid generic "I built a CRUD app" — show problem-solving depth.

  9. 09

    A Python web application is running slow. How do you identify and fix the bottleneck?

    SituationalMedium

    Tip: Profile first — never guess. Use `cProfile` or `py-spy` for CPU bottlenecks, Django debug toolbar for query issues. Common culprits: slow DB queries (missing index), serialisation overhead, or external API calls. Measure before and after any fix.

  10. 10

    What is `*args` and `**kwargs`? When would you use them?

    TechnicalEasy

    Tip: `*args` collects extra positional arguments as a tuple. `**kwargs` collects extra keyword arguments as a dict. Use when building wrappers/decorators or flexible APIs where the caller may pass an unknown number of arguments.

  11. 11

    What is the difference between deep copy and shallow copy in Python?

    TechnicalMedium

    Tip: Shallow copy creates a new container but nested objects are still shared references. Deep copy recursively copies all nested objects. Shallow copy trap: mutating a nested list in the copy also changes the original.

  12. 12

    Django vs Flask vs FastAPI — when would you choose each for a new project?

    HREasy

    Tip: Django: full-featured, admin panel, ORM, auth — best for data-heavy CRUD apps. Flask: lightweight, minimal, great for small APIs or prototypes. FastAPI: async-first, auto-generated OpenAPI docs, Pydantic validation — best for high-performance ML or data APIs.

Practice answering, not just reading

Take a full scored mock interview tailored to your resume. Get feedback on technical depth, clarity, structure, confidence, and relevance — free to start.

Start free mock interviewFree question generator

Explore more

  • All Python Developer questions
  • All TCS questions

Related guides and tools

  • STAR method with examples
  • HR interview answer tips
  • Placement interview prep guide
  • Top fresher interview questions
  • All articles