Python Technical Interview Preparation Guide
1. Python Basics
1 Python Features: Interpreted, dynamically typed, open-source, OOP, extensive libraries.
2 Data Types: int, float, list, tuple, dict, set, bool, NoneType.
3 List vs Tuple vs Set: Mutable, Ordered, Duplicates (List: Yes/Yes/Yes, Tuple: No/Yes/Yes, Set:
Yes/No/No).
4 ‘is’ vs ‘==’: identity vs value equality.
2. Functions & Control Flow
1 *args and **kwargs allow variable-length arguments.
2 Lambda functions are inline anonymous functions.
3 Decorators modify function behavior with '@'.
4 List comprehension provides compact loops: [x**2 for x in range(5)].
3. OOP & Advanced Concepts
1 OOP pillars: Encapsulation, Inheritance, Polymorphism, Abstraction.
2 __init__ initializes objects, __str__ defines string representation.
3 @staticmethod has no self/cls; @classmethod uses cls.
4 Generators yield values lazily; used for memory efficiency.
5 copy vs deepcopy: shallow vs recursive copy.
4. Pandas & Data Handling
1 Read CSV: pd.read_csv('[Link]').
2 Filter rows: df[df['Amount'] > 1000].
3 Group & aggregate: [Link]('Customer')['Sales'].sum().reset_index().
4 Merge: [Link](df1, df2, on='ID', how='inner').
5 Handle missing values: [Link](0, inplace=True).
5. Common Coding Questions
1 Reverse a string: s[::-1].
2 Palindrome check: s == s[::-1].
3 Factorial (recursion): factorial(n) = n * factorial(n-1).
4 Fibonacci: iterative a,b = 0,1.
5 Find duplicates: [x for x in set(lst) if [Link](x)>1].
6. Quick Tips
1 Know difference between shallow vs deep copy.
2 Understand try-except-else-finally structure.
3 Practice pandas and list comprehensions daily.
4 Prepare for questions on data structures (list, dict, set).
5 Have a short project example using Python ready to discuss.