Python Interview Questions

Roy Smith roy at panix.com
Mon Sep 23 09:06:45 EDT 2013


Somebody, whose identity has been lost in three-deep quoting, said:
> > > I am now appearing for Job Interviews these days and I am
> > > wondering if anybody of you appeared for a Python
> > > Interview. Can you please share the questions you were
> > > asked. That will be great help to me.

We have a standard list of about 2 dozen screening questions we use that 
cover a broad but shallow swath of CS, Unix, and Python.  I'm not going 
to share the exact questions, but here's some of the Python topics we 
cover:

The ramifications of string immutability.

How default function arguments work, especially how they interact with 
mutable objects.

How booleans and various ways of testing for equality work.

A question about subclassing a built-in type.

List comprehensions vs. generator expressions.

We don't expect everybody to get every question, but it gives us a quick 
first cut to evaluate applicants before we decide to bring them in for 
an interview or not.

We also want to see that you understand some basic computer science.  If 
nothing else, you need to understand, what O(n) means, and be able to 
give some examples of Python code which exhibit various orders of 
complexity.



More information about the Python-list mailing list