Frequently Asked Python Interview Question
Practice Set 1
01) How Python code Execute?
02) Why Python is interpreted language?
03) Why Python is known as a scripting language?
04) What is PVM?
05) How Python manages its memory?
06) What is namespace in Python?
07) What are built-in data types in Python?
08) What is literal?
09) What is docstring?
10) How to create a custom datatype in Python?
11) What is the difference between List, Tuple, and Set?
12) What is faster between List and Tuple? Explain Why?
13) What is the difference between Python List and Array? In both cases how memory allocates?
14) If I want to update a Tuple how can I do it?
15) How many types of dictionaries present in Python?
16) What is the difference between Dict and OrderDict?
17) What is the advantage of using Dict?
18) You have a list how can you make sure all the elements in the list should be unique?
19) What is monkey patching in Python?
20) What is a Decorator in Python? Why we use it?
21) What is filter method in Python?
22) What is lambda function in Python?
23) What is map function in Python?
24) What is Partial function in Python? Why we use it?
25) What is the concept of ChainMap in Python?
26) What is Stack &Queue?
27) what is deque in Python?
28) What is negative indexing in Python?
29) What is slicing in Python? What is the advantage of it?
30) What is object and class?
31) What is __new__ and __init__ method?
32) What is a property decorator? what we use it?
33) What is abstract class?
34) What we need Inheritance? what is the advantage and disadvantage of it?
35) What is diamond problem? How you deal with it using Python?
36) What is multiple Inheritance? Explain different types of Inheritance?
37) What is a constractor in Python class?
38) What is Polymorphism?
39) What is compile-time and runtime Polymorphism? is Python support both? if not Why?
40) How to declare Private, Protected, and Public attributes in Python?
41) What is the difference between __str__ and __repr__?
42) What is class attribute? and class method?
43) What is static method? What is the advantage of it?
44) What is generator function in Python?
45) What is iter in Python?
46) What is name mangling in Python?
47) Explain try, except, else, and finally?
48) Why we use try except?
49) How to raise exceptions in Python?
50) How to create a custom exceptions class?
51) What is Package and Module in Python? Why we create packages and modules?
52) What is Multiprocessing? with example
53) What is Multithreading? with example
54) What is thread lock? What is the difference between Tlock and Rlock?
55) Difference between Multiprocessing and Multithreading?
56) Why we use multiprocessing pool? and when we use it?
57) What is Operator overloading in Python?
58) What is statically typed vs dynamically typed?
Practice Set 2
01) What will be the output of the following code?
t = (10, 11, [20, 21], 12)
t[2][0] = 40
print(t)
02) What will be the output of the following code?
s = "Kuntal Samanta"
print(s[5:8])
t = s[0] + s[-2: ]
print(t)
03) What will be the output of the following code?
l = [10, 11, 12, 13, 14]
k = l
k[0] = 20
print(l)
Comments
Post a Comment