Python Practice & Career
Python Interview Questions
A quick-reference set of the most common Python interview questions asked in fresher and internship interviews in India, each with a short, correct answer you can explain in your own words.
Core Python Questions
| Question | Short answer |
|---|---|
| Is Python compiled or interpreted? | Interpreted — code runs line by line via the Python interpreter (with an internal bytecode step). |
| What are Python’s key features? | Simple syntax, dynamically typed, interpreted, huge standard library, cross-platform, free and open-source. |
| Difference between a list and a tuple? | Lists are mutable (changeable); tuples are immutable (fixed). Tuples are slightly faster and can be dictionary keys. |
| What is the difference between == and is? | == compares values; is compares identity (whether two names point to the same object). |
| What are mutable and immutable types? | Mutable: list, dict, set. Immutable: int, float, str, tuple, bool. |
| What is a dictionary? | An unordered collection of key-value pairs with fast lookup by key. |
Functions & OOP Questions
| Question | Short answer |
|---|---|
| What are *args and **kwargs? | *args collects extra positional arguments as a tuple; **kwargs collects extra keyword arguments as a dictionary. |
| What is a lambda function? | A small anonymous function written in one line, e.g. lambda x: x * 2. |
| What is a decorator? | A function that wraps another function to add behaviour without changing its code, using @ syntax. |
| What is self in a class? | A reference to the current object instance, used to access its attributes and methods. |
| What is inheritance? | A class deriving attributes and methods from a parent class to reuse and extend code. |
| What is the difference between a list and a set? | A list is ordered and allows duplicates; a set is unordered and stores only unique items. |
A Common Coding Question
Interviewers often ask you to reverse a string or a list. In Python, slicing makes this a one-liner — be ready to explain it.
text = "python"
print(text[::-1]) # nohtypDon’t just memorise answers — be ready to write small examples on paper or a whiteboard. Explaining your thinking matters as much as the code.
Frequently Asked Questions
What Python topics are most important for fresher interviews?+
Data types, lists vs tuples, mutability, dictionaries, functions, *args/**kwargs, basic OOP (classes, inheritance) and simple string/list problems using slicing and loops are the most commonly tested topics.
Do I need to know advanced Python for an internship interview?+
Usually no. Solid basics — loops, functions, data structures and simple OOP — plus the ability to write small programs clearly are enough for most internship and fresher roles.
