Placement Prep

Top Python Interview Questions for Freshers in India — 2026 Placements

👤 By Rohith Builds 📅 Updated: June 2026 ⏱️ 12 Min Read

If you are gearing up for campus placements or applying to off-campus roles at service companies (like TCS, CTS, Infosys) or fast-growing startups in India, Python is one of the most frequently tested languages.

Recruiters don't just want you to write syntax; they want to test your understanding of how Python manages memory, handles data collections, and structures object-oriented logic.

In this guide, we have compiled the absolute **top python interview questions for freshers** that you are guaranteed to face in your placements. We will cover core concept questions, OOPS definitions, and common coding round challenges. Let's get your python interview prep india started.

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

This is a classic question. The main differences are:

  • Mutability: Lists are mutable (their values can be changed after creation using methods like append() or index assignment). Tuples are immutable (their values cannot be changed once defined).
  • Syntax: Lists use square brackets [1, 2, 3], while tuples use parentheses (1, 2, 3).
  • Performance: Tuples are slightly faster and consume less memory than lists because they are stored in a single block of memory.

2. How is memory managed in Python?

Understanding memory management is key for advanced roles:

  • Private Heap: Python allocates all objects and data structures in a private heap space. Developers do not have direct access to this heap; it is managed by the Python memory manager.
  • Reference Counting: Python keeps track of the number of references pointing to an object. When an object's reference count drops to zero, the memory occupied by the object is automatically deallocated.
  • Garbage Collector: Python has an internal cyclic garbage collector that identifies and cleans up reference cycles (e.g., two objects referencing each other) that reference counting alone cannot clean.

3. What are Decorators and how do they work?

Decorators are a powerful feature used to modify the behavior of a function or class method without changing its source code. They take another function as an argument, wrap its execution, and return a modified function.

Here is a simple example:

def log_decorator(func):
    def wrapper():
        print("Function starts...")
        func()
        print("Function ends.")
    return wrapper

@log_decorator
def say_hello():
    print("Hello World!")

say_hello()
# Output:
# Function starts...
# Hello World!
# Function ends.

4. What is the difference between a Deep Copy and a Shallow Copy?

When copying compound objects (objects containing other objects, like lists of lists):

  • Shallow Copy: Constructs a new compound object and inserts references to the original nested objects. If you modify a nested object in the copy, it also changes the original. You create one using copy.copy().
  • Deep Copy: Recursively copies the compound object and all of its nested objects. Modifying the copy will have no effect on the original. You create one using copy.deepcopy().

5. Common Placement Coding Challenges

Be prepared to write code on the spot for these basic questions:

Challenge A: Reverse a String without using built-in library functions

def reverse_string(s):
    reversed_str = ""
    for char in s:
        reversed_str = char + reversed_str
    return reversed_str

print(reverse_string("rohith")) # Output: htihor

Challenge B: Find duplicates in a list in O(N) linear time

def find_duplicates(lst):
    seen = set()
    duplicates = set()
    for item in lst:
        if item in seen:
            duplicates.add(item)
        else:
            seen.add(item)
    return list(duplicates)

print(find_duplicates([1, 2, 3, 1, 2, 4])) # Output: [1, 2]

Ready to Ace Your Technical Placements?

Practice your coding skills, read detailed OOPS and SQL definitions, and get instant feedback on your code from Rohi, our interactive AI Tutor, for free.

Prepare on Rohith Builds