# Question Companies Difficulty Type Frequency
Section A – Basics (Data Types, Variables, Operators)
1 What are Python’s built-in data types? Google, Infosys Easy Theory Most frequent
2 Difference between mutable and immutable types? Amazon, TCS Easy Theory Most frequent
3 What is the difference between is and ==? Microsoft, Capgemini Medium Theory Normal
4 Explain Python’s dynamic typing. Meta, Wipro Easy Theory Normal
5 How are integers and floats stored in memory? Google, Accenture Medium Theory Medium
6 Explain Python variable scope (LEGB rule). Amazon, Cognizant Medium Theory Normal
7 What are Python keywords? Infosys, TCS Easy Theory Most frequent
8 Explain Python’s indentation rules. Wipro, HCL Easy Theory Most frequent
9 What are Python’s operators (arithmetic, logical, bitwise)? Google, Capgemini Easy Theory Most frequent
10 Explain operator precedence in Python. Amazon, Infosys Medium Theory Normal
Section B – Control Flow (Loops, Conditionals)
11 Difference between while and for loops. Amazon, HCL Easy Theory Most frequent
12 How do you use break, continue, pass? Infosys, Cognizant Easy Practical Most frequent
13 What is list comprehension? Example. Google, TCS Easy Practical Most frequent
14 Explain nested loops with example. Wipro, Microsoft Easy Practical Normal
15 What are ternary operators in Python? Amazon, Capgemini Medium Both Normal
16 How do all() and any() work? Google, Infosys Medium Both Normal
17 How do you implement switch-case in Python? Microsoft, Cognizant Medium Practical Medium
18 How do you iterate with index and value together? Amazon, Capgemini Easy Practical Most frequent
19 Explain enumerate() with example. Google, Infosys Easy Practical Most frequent
20 What is zip() and how is it used? Amazon, Wipro Easy Practical Most frequent
Section C – Functions
21 Difference between functions and methods? Meta, Infosys Easy Theory Most frequent
22 What are default, keyword, and positional args? Google, Cognizant Medium Both Most frequent
23 Explain *args and **kwargs with example. Microsoft, Amazon Medium Both Most frequent
24 What is recursion in Python? TCS, Wipro Medium Both Normal
25 What are anonymous (lambda) functions? Google, Meta Easy Both Most frequent
26 Difference between map, filter, reduce. Amazon, Capgemini Medium Practical Normal
27 Explain closures in Python. Microsoft, Infosys Hard Both Medium
28 What are function annotations? Google, Wipro Medium Theory Medium
29 Explain scope of variables inside functions. Amazon, TCS Easy Theory Most frequent
30 How does recursion differ from iteration? Microsoft, Infosys Medium Both Normal
Section D – OOP (Object-Oriented Programming)
31 What is init in a class? Google, Accenture Easy Theory Most frequent
32 Explain inheritance in Python. Amazon, Infosys Medium Both Most frequent
33 What is method overriding vs overloading? Meta, Wipro Medium Theory Normal
34 Difference between class vs instance variables. Google, Cognizant Medium Both Most frequent
35 What are Python’s magic methods (str, len)? Amazon, TCS Medium Both Normal
36 Explain polymorphism in Python. Microsoft, Infosys Medium Theory Normal
37 What are abstract classes and interfaces? Google, Wipro Hard Theory Medium
38 Difference: classmethod, staticmethod, instance method. Amazon, Capgemini Medium Both Most frequent
39 How does multiple inheritance work in Python? Microsoft, Infosys Medium Theory Medium
40 Explain super() and its use. Google, Wipro Medium Both Normal
41 What is object composition vs inheritance? Meta, Amazon Medium Theory Medium
42 What is duck typing in Python? Google, Microsoft Medium Theory Medium
43 How is encapsulation achieved in Python? Infosys, TCS Medium Theory Normal
44 Difference between private, public, protected attributes. Wipro, Capgemini Medium Theory Normal
45 Explain multiple constructors in Python. Amazon, Cognizant Medium Practical Medium
Section E – Memory, Performance, Internals
46 What is Python’s GIL? Google, Microsoft Hard Theory Medium
47 Explain garbage collection in Python. Amazon, Infosys Medium Theory Normal
48 Difference between shallow vs deep copy. Meta, TCS Medium Both Most frequent
49 What are Python namespaces? Google, Capgemini Medium Theory Normal
50 What is Python’s memory management model? Microsoft, Amazon Hard Theory Medium
51 How does Python handle memory leaks? Infosys, Wipro Hard Theory Medium
52 Explain reference counting. Google, Amazon Medium Theory Normal
53 Explain weak references. Microsoft, Meta Hard Theory Rare
54 How does Python handle multi-threading with GIL? Google, TCS Hard Theory Medium
55 Explain multiprocessing vs multithreading. Amazon, Wipro Medium Theory Normal
Section F – Advanced Python Features
56 What are iterators in Python? Amazon, Wipro Medium Both Most frequent
57 What are generators in Python? Google, Infosys Medium Both Most frequent
58 Generator expressions vs list comprehensions. Microsoft, TCS Medium Both Normal
59 What are decorators? Provide example. Meta, Google Hard Both Normal
60 What is a context manager and with statement? Amazon, Infosys Medium Both Medium
61 Explain Python’s @property decorator. Microsoft, Capgemini Medium Both Medium
62 What is monkey patching? Google, Infosys Hard Theory Rare
63 Explain metaclasses in Python. Amazon, Meta Hard Theory Rare
64 What are dunder (magic) methods? Microsoft, TCS Medium Theory Normal
65 Explain method resolution order (MRO). Google, Wipro Hard Theory Medium
Section G – Strings & Collections
66 Reverse a string (3 ways). TCS, Infosys Easy Practical Most frequent
67 Check if a string is palindrome. Google, Capgemini Easy Practical Most frequent
68 What is string immutability in Python? Amazon, Microsoft Medium Theory Normal
69 String formatting methods: %, .format, f-strings. Meta, Wipro Medium Both Most frequent
70 How do you count unique words in a string? Amazon, Infosys Medium Practical Normal
71 Remove punctuation from a string. TCS, Cognizant Easy Practical Normal
72 Find frequency of characters in a string. Wipro, Capgemini Easy Practical Most frequent
73 Explain slicing with examples. Google, Microsoft Easy Practical Most frequent
74 How do you check substring presence? Amazon, Infosys Easy Practical Most frequent
75 How to convert string to list and vice versa? Meta, TCS Easy Practical Most frequent
76 How do you merge two dictionaries? Google, Capgemini Easy Practical Most frequent
77 Difference between dict and OrderedDict. Amazon, Wipro Medium Theory Normal
78 How do you sort a dictionary by value? Microsoft, Infosys Medium Practical Normal
79 How do you use defaultdict and Counter? Google, Amazon Medium Practical Medium
80 Difference between list, set, and dict performance. Meta, Wipro Medium Theory Medium
Section H – Error Handling, File I/O, Modules
81 How does exception handling work? Amazon, Infosys Medium Both Most frequent
82 Difference between try/except/finally/else. Microsoft, Cognizant Medium Theory Normal
83 Custom exceptions in Python. Google, Wipro Medium Practical Medium
84 How to open, read, write files? Infosys, TCS Easy Practical Most frequent
85 Difference between text and binary mode in file I/O. Amazon, Capgemini Medium Theory Normal
86 What is Python’s with open()? Google, Wipro Easy Practical Most frequent
87 Explain Python modules and packages. Meta, TCS Easy Theory Most frequent
88 What are Python’s import mechanisms? Microsoft, Infosys Medium Theory Normal
89 What is name == "main" in Python? Google, Cognizant Easy Theory Most frequent
90 How to create virtual environments in Python? Amazon, Wipro Medium Practical Normal
Section I – Algorithms & Practice Coding (Core Python)