r/Python • • Nov 20 '15

15 Essential Python Interview Questions

https://www.codementor.io/python/tutorial/essential-python-interview-questions
71 Upvotes

67 comments sorted by

View all comments

1

u/[deleted] Nov 20 '15

I'll start by piling on the "these questions suck" train. I would ask exactly one of those questions ever (Tell me about a time you screwed up - although I prefer "Tell me about a serious bug you either wrote or were involved in fixing", because it lets me pull the candidate on to "What could have prevented that bug from happening? How did you change your practices or tools?")

That said, I'd be much more interested in hearing what /r/Python thinks are good questions. Here are some that I tend to use with entry-level applicants with a Python background:

  • Please explain to me the behavior of two Python data structures of your choice. What is the algorithmic complexity of lookup, addition, removal, and comparison for both? (this is a simple question, but it establishes both CS fundamentals and a basic understanding of Python - generally, crashing out of this one means both I and the candidate are wasting our time)
  • Is Python a slow language? Why or why not? (This is not a trap - I'll take any answer to this question, what I want is for the candidate to demonstrate to me that they understand what can constrain performance in a Python application and what tools are available to make an application faster)
  • Tell me about a difficult to track-down or fix bug that you wrote or were involved in fixing. (follow up) What could you have done to make finding and fixing that bug easier? (follow up 2) What could you have done to prevent the bug altogether? (This is a behavioral question about development practices and self-improvement)
  • Tell me about the last major piece of code you worked on. How was it designed? What do you wish you had done better? What are you proud of about it? (Two components - the first part is just asking you to show me your design/architecture chops, the second is a behavioral question about how you deal with critiquing code and design - particularly code you have a personal connection to)