Python Basic Interview Questions (2020)

Python Learning
3 min readMay 10, 2020

--

  1. What is Python?
  2. What are the benefits of Python?
  3. What are the key features of Python?
  4. What type of language is Python? Programming or Scripting?
  5. What are the applications of Python?
  6. What is the difference between list and tuple in Python?
  7. What are the global and local variables in Python?
  8. Define PYTHON PATH?
  9. What are the two major loop statements?
  10. What do you understand by the term PEP 8?
  11. How memory management is done in Python?
  12. What is the principal difference between Java and Python?
  13. Define modules in Python?
  14. What are the built-in types available in Python?
  15. What are Python Decorators?
  16. How do we find bugs and statistical problems in Python?
  17. What is the difference between .py and .pyc files?
  18. How do you invoke the Python interpreter for interactive use?
  19. Define String in Python?
  20. What do you understand by the term namespace in Python?
  21. How do you create a Python function?
  22. Define iterators in Python?
  23. How does a function return values?
  24. Define slicing in Python?
  25. How can Python be an interpreted language?
  26. function without return is valid?
  27. Define package in Python?
  28. How can we make a Python script executable on Unix?
  29. Which command is used to delete files in Python?
  30. Define pickling and unpickling in Python?
  31. Explain the difference between local and global namespaces?
  32. What is a boolean in Python?
  33. What is Python String format and Python String replace?
  34. Name some of the built-in modules in Python?
  35. What are the functions in Python?
  36. What are Dict and List comprehensions in Python?
  37. Define the term lambda?
  38. When would you use triple quotes as a delimiter?
  39. Define self in Python?
  40. What is _init_?
  41. Define generators in Python?
  42. Define docstring in Python?
  43. How do we convert the string to lowercase?
  44. How to remove values from a Python array?
  45. What is Try Block?
  46. Why do we use the split method in Python?
  47. How can we access a module written in Python from C?
  48. How do you copy an object in Python?
  49. How do we reverse a list in Python?
  50. How can we debug a Python program?
  51. Write a program to count the number of capital letters in a file?
  52. Write a program to display Fibonacci sequence in Python?
  53. Write a program in Python to produce Star triangle?
  54. WAP to check whether the given number is prime?
  55. Python code to check string palindrome or not?
  56. Write Python code to sort a numerical dataset?
  57. What is the output of the following code?
  58. What is the procedure to install Python on Windows and set path variable?
  59. Differentiate between SciPy and NumPy?
  60. How do Python arrays and lists differ from each other?
  61. Can we make multi-line comments in Python?
  62. What is the difference between range and xrange?
  63. Explain how can we build or set up the database in Django?
  64. List out the inheritance styles in Django?
  65. How to save an image locally using Python in which we already know the URL address?
  66. How can we access sessions in flask?
  67. Is flask an MVC model? If yes, justify your answer by showing an example of your application with the help of MVC pattern?
  68. What are the database connections in Python Flask, explain?
  69. Explain the procedure to minimize or lower the outage of Memchached server in Python development?
  70. What is Dogpile effect?
  71. What are the OOPS concepts in Python?
  72. Define object in Python?
  73. What is a class in Python?
  74. How to create a class in Python?
  75. What is the syntax for creating an instance of a class in Python?
  76. Define what is “Method” in Python programming?
  77. Does multiple inheritance is supported in Python?
  78. What is data abstraction in Python?
  79. Define encapsulation in Python?
  80. What is polymorphism in Python?
  81. Does Python make use of access specifiers?
  82. How can we create an empty class in Python?
  83. Define Constructor in Python?
  84. How can we create a constructor in Python programming?
  85. Define Inheritance in Python?

Follow Us on Instagram for more :)

--

--

Python Learning
Python Learning

Written by Python Learning

Bloggers, Spreading the love for Python Community, 1M+ Followers on Instagram