Interview Question In Python

 Interview Questions In Python - 2021


Questions on Basic Python


  1. What is an Interpreted language?

  2. What is a dynamically typed language?

  3. What is PEP 8 and why is it important?

  4. How is memory managed in Python?

  5. What are Python namespaces? Why are they used?

  6. What is self in Python?

  7. What is slicing in Python?

  8. What is slicing in Python?

  9. What are negative indexes and why are they used?

  10. Explain docstring in Python?

  11. Which programming language is a good choice between Java and Python ? And why?

  12. Explain pass in Python.

  13. What are iterators?

  14. What are Pandas?

  15. What are dataframes?

  16. What is the difference between list and tuples in Python?

  17. Define encapsulation in Python?

  18. What are the common built-in data types in Python?

  19. What is type conversion in Python?

  20. Is the python case sensitive?

  21. What are Python packages?

  22. What do you mean by Python literals?



Questions on List

  1. Write a Python program to remove duplicate elements in the list.
    Input : [1,1,2,2,3,3]
    Output : [1,2,3]

  2. Write a Python program to find the number of strings in the list.
    List: ['abc','xyz','abc','1221']
    Input : 'abc'
    Output: 2

  3. Write a Python program to check if a list is empty or not.

  4. Given a Python List, turn every item of a list into a square.
    Input : aList=[1,2,3,4,5,6,7,8]
    Output : [1, 4, 9, 16, 25, 36, 49, 64]

  5. How to convert string into List

  6. How to convert list into string.

  7. Write a Python program to sum all the items in a list. 

  8. Write a Python program to multiply all the items in a list.

  9. Write a Python program to get the largest number from a list.

  10. Write a Python program to get the smallest number from a list.

  11. Write a Python program to clone or copy a list.

  12. Write a Python program to print the numbers of a specified list after removing even numbers from it.
    Input : [7,8, 120, 25, 44, 20, 27]
    Output : [7, 25, 27]



Questions on Inbuilt function

  1. What is zip() function in Python?

  2. What is the difference between remove() function and del statement?

  3. What is swapcase() function in Python?

  4. How to remove whitespaces from a string in Python?

  5. Why do we use join() function in Python?

  6. What is the use of help() function?

  7. Give an example of shuffle() method?

  8. What is the bytes() function?

  9. What is a map() function in Python?

  10. What is __init__ in Python?

  11. What does len() do?

  12. What is split() function used for?

  13. What is eval() function used for?


Questions on String

  1. In Python how do you convert a string into lowercase?

  2. How can you capitalize the first letter of a string?

  3. How can a number be converted to a string?




More Questions Will Be Updated, Stay Connected.


If you have any doubt/queries then please contact us

Contact Us






Comments

Popular posts from this blog

How to set image in carousel using flask?

Invalid syntax , perhaps you forgot a comma? Error in Python

How to run PL/SQL Code With Command Line?