Python Interview Questions and Tips

A Guide to Python Interview Questions

Unlike other parts of your resume, it’s difficult to fake answers to Python interview questions. Maybe your two years of customer service experience is more like one and a half. But your knowledge of Python — you either have it or you don’t. The interviewer is going to find that out sooner than later.

That’s because Python is an interpreted language for computer programming. In layman’s terms: Python is a series of codes that allow functions on a computer. It’s similar to Javascript in some ways (see: 6 Perfect JavaScript Interview Questions), but is generally considered an easier programming language to learn.

Still — it’s a language. Like other languages in the world, it takes time to master. It would probably take you a month to learn the very basics, and after that there is still much to know before you are a master. This makes Python interview questions fairly difficult to prepare for. Different companies will test you in different ways.

What’s the best way to measure knowledge of any language? Probably to have a conversation. Since you can’t really do that with a programming language, companies will either a) ask you questions about Python b) sit you in front of a computer and see what you can do c) put you in front of whiteboard to map out functions, or d) give you a take home test.

Python interview questions asked by a creative agency are going to be different than questions asked by a predictive analytics company. Although still a key part of your job, you’ll likely use your knowledge of Python less at a creative agency if hired.  At creative agencies you’ll work on a variety of projects with different scopes and budgets. Your entire creative skill set is necessary in such projects, not just Python knowledge.

Where to begin your preparation?

Here are some ideas of what creative agencies want

At first it may seem strange that a creative agency would require applicants with knowledge in Python, or any computer programming language. But creative agency workers don’t sit around sipping gin and tonics and smoking cigarettes in conference rooms like they do in Mad Men. Today, agency projects are centered around the tech world: social media posts, app development, web design, online ad platforms.

As Randy Bishop points on in “Your Agency Needs a Technologist”, if an agency’s projects are centered around technology, they need staff with a knowledge of computer programming. He makes his point clear: you wouldn’t hire a auto technician who doesn’t know how to open the hood of your car.

When creative agencies ask Python interview questions, they’re really looking for two qualities: a person who can use Python to code websites and apps for clients and a person who can be a solid reference for Python and tech-related questions.

The first quality is straightforward. Agencies come across projects where coding is necessary. Thus, they need someone who can code. Python is one the most widely used coding languages in the world. Thus, it is preferable if applicants know it.

The second quality requires less explicit knowledge of the technical aspect of Python but a greater understanding of the technical side of creative work. If you are hired for your knowledge of Python, you’ll likely sit in on meetings as part of the technology team and be expected to input knowledge accordingly. In writing Proposals, Creative Briefs, and Invoices, you may be used to write a summary of the technical side of a particular project.

When preparing for Python interview questions, you must be able to perform coding, and also be able to articulate information to those with little to no knowledge of Python.

Therefore, the ability to articulate a basic understanding of Python benefits you greatly in the application process.

Python basic facts

At least part of all Python interviews are conversation based. How well can you talk about Python in theory? Let’s review some basic facts.

Python began in the early 1990s as a more accessible programming language. To this day, it remains one of the “easiest” programming languages to learn. This is largely due to the visually pleasing code form. It has fewer lines and more white spaces that other computer languages.

It’s free and covers a wide variety of uses: data engineering, wrangling, and munging, as well as webs scraping and app building. It’s an object-oriented programming language. Data is the center of Python code, not actions. What it lacks in visualization and statistical modeling it makes up for in solid, user-friendly code language.

Examples of Python’s philosophy, taken from The Zen of Python:

  • Beautiful is better than ugly
  • Explicit is better than implicit
  • Simple is better than complex
  • Complex is better than complicated
  • Readability counts

Could you explain the philosophy of Python to a non-believer?

The momentum behind tech use in creative agencies gained speed with the advent of Facebook and other social media platforms for advertising. Since then, agencies have had access to Excel spreadsheet after Excel spreadsheet of data about their client’s audiences. Understanding the tech behind web development is more important than ever.

But theory will only get you so far. Technical questions are harder to answer under pressure. Here are some technical-based Python interview questions to get your brain going.

5 common Python interview questions

Whether on the computer, the whiteboard, on a take-home test, or verbal, technical Python interview questions will test your knowledge of both simple and complex Python code. Here are 5 examples that should cover your bases.

1. Python and multi-threading. Is it a good idea? List some ways to get some Python code to run in a parallel way. Question from

Python doesn’t really allow multi-threading. It is possible to use a multi-threading package, but not advised. In truth threading happens so fast with Python, it’s simultaneous to the human eye. Multi-threading packages slow this down.

2. Name 3 statements in Python and describe what they do. Question adapted from

The “class” statement completes a block of code, then assigns a namespace to a class. The “def” statement defines a function. You can use the “assert” statement in debugging to check conditions.

3. What is the distinction between expressions and statements? Question adapted from

Expressions cannot contain statements. The interviewer may ask you to provide an example of this, like how the statement “a = 1” cannot be part of the conditional expression. This concept is more rigid in Python than other computer programming languages. This is where specific Python knowledge is on your side.

4. How do you keep track of different versions of your code? Question from

The answer is version control. Version control helps you keep track of all the changes made to your code. That way, if you need to trace back certain changes in the code’s history, you can pinpoint when it happened. Nothing like showing off organization skills to your future employer.

5. Describe any personal Python projects you’ve pursued.

This is probably the most important questions. It’s one thing to have taken some lessons in Python and another thing to actually use it in your free time. It’s in the same way that there is a difference between a kid who does their homework every night and a kid who reads for fun. The latter is more impressive, so have some impressive work to tell about!

Tutorials, however, are a good place to review your knowledge before an interview. Python’s website has links to all levels of different tutorials. If you haven’t used Python in awhile, these are great ways to test yourself.

Bric is all about helping creative agencies become more efficient. We wish you the best of luck in pursuit of a new job, and hope these Python interview questions and tips bring you one step closer to success.