0% found this document useful (0 votes)
10 views2 pages

Python Interview Questions

The document contains a comprehensive list of Python interview questions categorized into Core Python and Advanced Python topics. It covers essential concepts such as data types, functions, object-oriented programming, error handling, and libraries like NumPy and pandas. The questions are designed to assess a candidate's understanding and proficiency in Python programming.

Uploaded by

sonusandip472
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Python Interview Questions

The document contains a comprehensive list of Python interview questions categorized into Core Python and Advanced Python topics. It covers essential concepts such as data types, functions, object-oriented programming, error handling, and libraries like NumPy and pandas. The questions are designed to assess a candidate's understanding and proficiency in Python programming.

Uploaded by

sonusandip472
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

datatechs.

in Pg: 1

Python Interview Questions


CORE PYTHON

1. Can you explain important features of Python?


2. What is byte code?
3. What is a frozen binary?
4. What is the role of PVM?
5. What is garbage collector?
6. Why Python is called interpreted language?
7. Why variables are not declared in Python?
8. How can you know the datatype of a variable?
9. What is the difference between C and Python?
10. What is the difference between Java and Python?
11. What is a sequence?
12. What is the difference between list and tuple?
13. What is the difference between bytes and bytearray?
14. What is the difference between set and frozenset?
15. What is indexing?
16. What is the difference between list and array?
17. Explain about slicing? How can you do reverse slicing?
18. Explain about assert statement?
19. What is a function? What is its use?
20. What is recursion? Can you give example where recursion can be used?
21. What is the difference between local and global variable?
22. What are mutable objects and immutable objects?
23. Why strings are created as immutable objects?
24. What are keyword arguments? How they are used?
25. What is the use of a star (*) before an argument in the function?
26. What is a decorator? Can you give examples for already available decorators in python?
27. What is the difference between a generator and a decorator?
28. What is a lambda? What is its advantage?
29. What is the difference between normal function and lambda?
30. What is the difference between package and module?
31. How can you import and use other programmers’ code in your programs?
32. What is the use of arange() ?
33. How can you know the number of elements in an array?
34. What is the difference between reshape() and flatten() ?
35. In numpy, all arrays are internally objects of which class?
36. What are the use cases of numpy?
37. Which default datatype is used for numpy numeric arrays?
38. Which methods are used to find matrix transpose? (HINT: transpose(), T)
39. What is list comprehension? What is its advantage?
40. What is the difference between script and program? Will Python come under script or program?

ADV PYTHON

41. How can you create a class and object to it, explain.
42. What is the use of self variable?
43. What is the difference between default constructor and parameterized constructor?
44. When a constructor is called?
datatechs.in Pg: 2

45. What is the difference between instance variable and class variable?
46. What is the difference between class methods and static methods?
47. What is name mangling?
48. What are dunders / double underscores / magic methods in Python?
49. Can you inherit a class from another class? How?
50. What is duck typing?
51. What is the difference between method overloading and method overriding?
52. How can you override a method?
53. All exceptions are sub classes of which class?
54. What is the difference between exception and error?
55. How can you handle multiple exceptions?
56. What is the use of finally block?
57. What is logging? Where is it useful?
58. What is the difference between text file and binary file?
59. What is the default buffer size in files?
60. What is context manager? Can you give examples? (Hint: with block, Lock, ZipFile)
61. What is pickle? Which method is used in pickle?
62. What is unpickle? Which method is used in unpickle?
63. Which methods are used in random accessing of files? (Hint: tell(), seek())
64. What is regular expression?
65. What is the difference between search() and findall() ?
66. What is the use of ^, $, *, +, ?, \d and \w in regular expressions?
67. How can you display system date and time?
68. What is connection object?
69. What is cursor?
70. What is the difference between fetchone() and fetchall() ?
71. What is database connector / driver?
72. What is the difference between Series and DataFrame?
73. What is the difference between iloc[] and loc[] ?
74. How can you create DataFrame from a .csv file and excel files?
75. When should we create a DataFrame? What are its uses?
76. When the DataFrame in the memory is modified, will it modify the data in the original file from
77. where the DataFrame is created?
78. How can view first 5 rows and last 5 rows in a DataFrame?
79. How can you sort the rows of a DataFrame into ascending order?
80. How can you remove NaN values found in the dataset?
81. What the attribute 'inplace=True' does in a DataFrame?
82. Why do we use matplotlib?
83. What is seaborn?
84. With what packages you worked in Python? (Hint: numpy, re, tkinter, threading, socket, pandas,
matplotlib, seaborn, etc.)
85. What is IDE? With which IDEs you have worked?

You might also like