The top 40 Python interview questions asked at TCS, Wipro, Infosys, Cognizant, Accenture, and HCL in 2026 fall into seven clusters: data types and mutability (28%), lists/tuples/dicts/sets (22%), OOP concepts (18%), string manipulation (12%), functions and lambdas (10%), file handling and exceptions (6%), and generators/decorators/comprehensions (4%). Most fresher Python interviews include 10–15 MCQs in the screening test (TCS NQT, Wipro NLTH, Infosys InfyTQ), 2–3 live coding questions (FizzBuzz, factorial, palindrome, two-sum), and 1–2 scenario questions (mutable default argument, list vs tuple, GIL impact). This guide gives you all 40 questions with concise answers and 12 working code examples, plus the topic-weightage table that mirrors what TCS NQT and Infosys InfyTQ actually test.
Table of Contents
- Python Topic Weightage in 2026 Fresher Interviews
- Company Round Formats (TCS / Wipro / Infosys)
- Python Basics (Q1–Q8)
- Lists, Tuples, Dicts, Sets (Q9–Q16)
- String Manipulation (Q17–Q20)
- Functions, *args, **kwargs, Lambda (Q21–Q26)
- Object-Oriented Python (Q27–Q33)
- Generators, Decorators, Comprehensions (Q34–Q37)
- File Handling & Exceptions (Q38–Q40)
- 4-Week Python Interview Prep Plan
Python Topic Weightage in 2026 Fresher Interviews
The frequency distribution below is compiled from candidate reports and public preparation resources across recent TCS NQT, Wipro NLTH, and Infosys InfyTQ drives (2023–2025). These are estimated ranges, not measured figures — treat them as a prep-weighting guide rather than exact data.
| Topic Cluster | Frequency in MCQ Round | Frequency in Coding Round |
|---|---|---|
| Data types, mutability, type casting | 28% | 8% |
| Lists, tuples, dicts, sets | 22% | 35% |
| OOPs (inheritance, polymorphism, dunder methods) | 18% | 20% |
| String manipulation | 12% | 18% |
| Functions, *args/**kwargs, lambda | 10% | 10% |
| File handling, exceptions | 6% | 5% |
| Generators, decorators, comprehensions | 4% | 4% |
Key trend: OOPs weight in MCQ rounds grew from ~12% in 2023 to ~18% in 2025. Expect it to stay elevated in 2026 as companies filter for production-readiness, not just scripting ability.
