You are on page 1of 6

1) What is Python? What are the benefits of using Python?

Ans: Python is a high level, interpreted, interactive, dynamically typed, loosely coupled, object oriented
programming language with automatic memory management and garbage collector.

2) What is the difference between list and tuple?

Ans: lists are mutable whereas tuples are immutable

3) What is Dict and List comprehensions are?

Ans: Dict and List comprehensions are syntactic sugar constructs that provide a way to build a dictionary
or list from a starting dictionary or list whilst altering or filtering elements.

4)What Is The Statement That Can Be Used In Python If The Program Requires No Action But Requires It
Syntactically?

Ans: The statement pass can be used when program requires no action.

5)What Does The chr() and ord() functions Do?

Ans: chr() function takes a Unicode code point (integer) and returns a single Unicode character, while
ord() function is used to return an integer of the given single Unicode character.

6)What Is Rstrip?

Ans: The rstrip() method returns a copy of the string with trailing characters removed (based on
the string argument passed).

7) How Do You Use The split() function?

Ans: The split() method is used to split a string into a list of substrings according to argument


passed, and returns the new list. If no argument is passed it splits the string according to white
space.

8) How Do You Use The join() function?

Ans: The join() function is used to join the list of strings with given argument and return a new
string. If no argument is given the substrings in the list are joined by white space.

9)How Do You Use The title() function?

Ans: The title() function is used on a string to capitalize each substring just after the white space.

10)How Does Python Manage The Memory?

Ans: Memory management in Python involves a private heap containing all Python objects and data
structures. The management of this private heap is ensured internally by the Python memory manager.
11) What Is The Set Object?

Ans:

12) Python List A Linked List?

Ans:

13) How To Assign Values For The Class Attributes At Runtime?

Ans:

14) How are arguments passed by value or by reference?

Ans:

15) What is lambda in Python?

Ans:

16) What are iterators and generators. Explain with a example

Ans:

17) What is module and package?

Ans:

18) What is context manager?

Ans:

19) What are closures?

Ans:

20)How can you share global variables across modules?

Ans:

21) What is the difference between .py and .pyc files?

Ans:

22) When is .pyc created?

Ans:

23) Explain the use of try: except raise, and finally?


Ans:

24) What happens if an error occurs that is not handled in the except block?

Ans:

25) How is a Python class instantiated?

Ans:

26) What is difernece between __init__ , __new__ and __call__?

Ans:

27) What does a function return if it does not return statement?

Ans:

28) Explain the use of break and continue with example.

Ans:

29) What is Garbage Collection?

Ans:

30) How to raise and catch an exception. Explain with example.

Ans:

31) What are decorators. Explain with example.

Ans:

32) How do you check presence of key in a dict?

Ans:

33) How to use enumerate?

Ans:

34) What are positional arguments and keyword arguments? How to pass and access these arguments

Ans:

35) What does a self keyword do?

Ans:
36) Explain static method, abstract method/class

Ans:

37) Differnece between static method and class method.

Ans:

38) How to see all the attributes/methods if a class/object?

Ans:

38) How is Python executed?

Ans:

39) How do you find the identification number of an object?

Ans:

40) How do you check whether the two variables are pointing to the same object ?

Ans:

41) What is difference between '==' and 'is' operators?

Ans:

42) How do you programmatically know the version of Python you are using?

Ans:

43) What are the ideal naming conventions in Python?

Ans:

44) What happens in the background when you run a Python file?

Ans:

45) What is Index Out Of Range Error?

Ans:

46) What is the difference between Python append () and extend () functions?

Ans:

47) How do you merge one dictionary with the other?


Ans:

48) How to walk through a list in a sorted order without sorting the actual list?

Ans:

49) What operations can we perform on set?

Ans:

50) Name some standard Python errors you know?

Ans: SyntaxError, TypeError, IndexError, ValueError, KeyError, IndentationError, AttributeError,


ArithmeticError, ImportError, ZeroDivisionError,

51) How Python supports encapsulation with respect to functions?

Ans:

52) What is pep8, pylint. how to use them.

Ans:

53) How do you open an already existing file and add content to it?

Ans:

54) What mode is used for both writing and reading in binary format in file?

Ans: w+ mode is used for both writing and reading in binary format in file.

55) Explain Inheritance in Python with an example.

Ans:

56) What is use of __all__?

Ans:

57) What is diffence between method and function?

Ans:

58) How can you randomize the items of a list in place in Python?

Ans:

59) What Is the Biggest Challenge Facing Your Current Job Right Now?
Ans: I have always felt that interactive work is better. Here at my current job, people interact so less and
that our work gets hampered. That I think is the biggest challenge here.

60) What Is Your Biggest Failure?

Ans: Every course I’ve completed in the minimum required time except for my M.Tech. It is a 2 years
course but it took 3 years to complete because of my project extension. I consider that is my biggest
failure.

61) Why are you leaving your current job?

Ans: I am working here as a software analyst for more than a year and I have got nothing to learn more.
Initially I was put into a machine learning project, when I thought that I could grow better in this field.
But then that project got stuck and they needed me in some other project for plugin development.
What I am doing in this project is just making some changes in the already built plugins, and presenting
it to the clients. No progress. So I think it’s time to move on.

You might also like