Interview questions

Python interview questions – page 4

168 questions. Tap “Show answer” to check yourself.

  1. Rules for local and global variables in python?

  2. Do they know a tuple/list/dict when they see it?

  3. When do you use list vs. tuple vs. dictionary vs. set?

  4. Does python support switch or case statement in Python? If not what is the reason for the same?

  5. Why was the language called as Python?

  6. What is used to represent Strings in Python? Is double quotes used for String representation or single quotes used for String representation in Python?

  7. What is the method does join() in python belong?

  8. In python, are there any databases to DB packages?

  9. Why does delegation performed in Python?

  10. What is the function of "self"?

  11. How the string does get converted to a number?

  12. What is the function of negative index?

  13. Write a program to check whether the object is of a class or its subclass.

  14. What are the commands that are used to copy an object in Python?

  15. What is the difference between deep and shallow copy?

  16. Write a program to find out the name of an object in python.

  17. How can the ternary operators be used in python?

  18. What are the ways to write a function using call by reference?

  19. Describe how exceptions are handled in python.

  20. What is used to create Unicode string in Python?

  21. When to use list vs. tuple vs. dictionary vs. set?

  22. Explain the disadvantages of python

  23. please give the code for these 1 2 4 7 11 16...

  24. Define python?

  25. Who created the Python programming language?

  26. 1) How to validate ip address using regex 2)program to increment ip address in python Please find answers to above questions thanks in advance.

  27. How does global value mutation used for thread-safety?

  28. Write a program to read and write the binary data using python?

  29. What is the process to run sub-process with pipes that connect both input and output?

  30. What are the different ways to generate random numbers?

Companies that ask Python questions