<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=555865791448670&amp;ev=PageView&amp;noscript=1">

Hire job fit candidates. Faster.

All Posts

Python Interview Question for Experienced

 Looking for Python interview questions? Here is the list of most important questions that can be asked in interviews. Make yourself ready with this comprehensive list of interview questions.

Python Interview Questions:

1. What will be the output of the code below in Python 2? Explain your answer.

def div1(x,y):

print "%s/%s = %s" % (x, y, x/y)

def div2(x,y):

print "%s//%s = %s" % (x, y, x//y)

div1(5,2)

div1(5.,2)

div2(5,2)

div2(5.,2.)

Also, how would the answer differ in Python 3 (assuming, of course, that the above [print] statements were converted to Python 3 syntax)?

2. What are the key differences between Python 2 and 3?

3. What are some alternative implementations to CPython? When and why might you use them?

4. How does Python's garbage collection work?

5. What is the difference between range and xrange? How has this changed over time?

6. Here's a function (Provide a function). Optimize it for me.

7. What will be the output of the code below?

List = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’]

print list [10:]

8. How does the GIL impact concurrency in Python? What kinds of applications does it impact more than others?

9. How do you iterate over a list and pull element indices at the same time?

10. How do you enforce ordering for a dictionary-style object?

11. How many ways can you append or concatenate strings? Which of these ways is fastest? Easiest to read?

12. What is PYTHONSTARTUP and how is it used?

13. Write a code for downloading a CSV in Python2 and Python3. (Provide a link to CSV file)

14. I'm getting a maximum recursion depth error for a function. What does this mean? How can I mitigate the problem?

15. Here's a class hierarchy with some methods defined. When I call this function, what gets printed?

Apart from these technical questions, ask these following general questions to find out more about candidates Python skills

16. What’s your favorite standard library module?

17. Tell me something you don't like about Python.

18. What was the most interesting project you have participated in? Can you describe it and tell why you consider it to be so interesting?

19. Do you like to participate in the analysis, design and deployment phases of a project or do you prefer to concentrate on the pure development of well-described task? Why?

20. I have noticed you listed Skill X on your CV. What’s your opinion about it?

21. Do you remember any programming project decision you made that was a failure? Why do you think it was a mistake? Why did it happen? What did you learn from this experience?

Nishi More
Nishi More
Nishi More is a Marketer and content writer at Interview Mocha. A writer who enjoys helping small businesses meet their hiring needs. When not writing she enjoys reading motivational books, latest trends in recruitment technology & explore new places.

Topics: Technical Hiring

Related Posts

What Skills Are Essential For Java Roles?

In June 1991, James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project. The original intention behind designing Java was for interactive television, however, it was too advanced for the digital cable television industry. Also, Java’s original name was Oak after an oak tree that was outside Gosling’s office. Then, the name changed to Green and at last for renamed Java, after the coffee that comes from Indonesia.

Campus Hiring Challenges Faced By Companies

Havard Business Review suggests that 72% of the millennials hear about companies from their friends, 68% through a job portal, and 45% on campus. Campus recruiting is the term used for hiring students and recent graduates straight from college or university.

How To Assess And Hire Data Scientists?

Data Science is booming and getting in demand with every passing day. We have already discussed this in our previous blog, i.e., The Rise And Rise Of Data Science! This significant boom in the data science industry came because organizations today are making a shift from CRUD (Create, Retrieve, Update, Delete) system to systems of insight. Thus, traditional ways of data processing are no longer suitable for processing a huge amount of data (big data) in fields like: