Member-only story

20 Python Interview Questions To Challenge Your Knowledge

A peek into data structures, programming concepts, and best practices

Ahmed Besbes
Towards Data Science
9 min readMar 21, 2022

--

Photo by Chris Ried on Unsplash

While continuously learning about the ins and the outs of my favorite programming language, I always keep track of the interesting stuff across multiple Notion pages.

In this article, I turned some of my notes into 20 interview questions that cover data structures, core programming concepts, and Python best practices.
Interestingly, a lot of these questions are asked in data science interviews.

Hope you’ll go through some of them and brush up on your Python skills.

Without much further ado, let’s jump right in. 🏊

1— What is the difference between a list and a tuple? When should you use each?

A list is a mutable data structure while a tuple is an immutable one.
A mutable object in Python has the ability to change its values.

--

--

Towards Data Science
Towards Data Science

Published in Towards Data Science

Your home for data science and AI. The world’s leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals.

Ahmed Besbes
Ahmed Besbes

Written by Ahmed Besbes

Medium Top Writer (+2M views) | I write about python and productionizing ML code into scalable apps. Exclusive content here: https://thetechbuffet.substack.com/

Responses (12)