Register Now


Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Register Now

It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways

Python Interview Questions for Data Science | 2021

Python Interview Questions for Data Science.
There has been a change in the type of questions asked in Python in the Data Science or Analyst interviews. Previously the questions were more around the libraries like Pandas and Numpy. There used to be questions around the implementation of various algorithms. But now a lot of questions are asked on the basics of Python like sorting with sort function, traverse an array, sum of right array from an index, hash map, etc.
We are looking forward to have 2-3 articles around these questions.
If you want to start from the basics of Python then do visit w3school first
Python Interview Questions for Data Science.

Python Interview Questions for Data Science

10 Python Questions recently asked in interviews

  1. Sum of Digits of a number.
    Ex. 243 = 2+4+3 = 9
Sum of digits in Python

2. Product of digits (Almost the same concept as above, but make sure that prod variable is initiated with 1 and while condition should be >0)

Product of digits in Python

3. Count number of even and odd numbers in a list

Number of odd and even digits in a list

4. Count number of even and odd numbers in a dictionary

Number of odd and even numbers in a dictionary

5. Create two lists of odd and even numbers from a list
L1 = [1,2,3,4,5,3,2]

even = [2,4,2]
odd = [1,3,5,3]

Create list of even and numbers from one list

6. Factorial of any number

Factorial of a number in Python

7. Check if two texts are anagram

Anagram example – silent is an anagram listen

Anagram in python

8. Converted a nested list in a flat list

Convert a nested list in a flat list

9. Cube of each numbers in a list using lambda function

Cube of each numbers in a list using lambda function

10. Use lambda function with filter

Daily Quiz

Daily Quiz Day 1 Questions
Daily Quiz Day 2 Questions
Daily Quiz Day 3 Questions
Daily Quiz Day 4 Questions
Daily Quiz Day 5 Questions
Daily Quiz Day 6 Questions
Daily Quiz Day 7 Questions
Daily Quiz Day 8 Questions
Daily Quiz Day 9 Questions
Daily Quiz Day 10 Questions

The Data Monk Interview Books – Don’t Miss

Now we are also available on our website where you can directly download the PDF of the topic you are interested in. At Amazon, each book costs ~299, on our website we have put it at a 60-80% discount. There are ~4000 solved interview questions prepared for you.

10 e-book bundle with 1400 interview questions spread across SQL, Python, Statistics, Case Studies, and Machine Learning Algorithms – Ideal for 0-3 years experienced candidates

23 E-book with ~2000 interview questions spread across AWS, SQL, Python, 10+ ML algorithms, MS Excel, and Case Studies – Complete Package for someone between 0 to 8 years of experience (The above 10 e-book bundle has a completely different set of e-books)

12 E-books for 12 Machine Learning algorithms with 1000+ interview questions – For those candidates who want to include any Machine Learning Algorithm in their resume and to learn/revise the important concepts. These 12 e-books are a part of the 23 e-book package

Individual 50+ e-books on separate topics

Important Resources to crack interviews (Mostly Free)

There are a few things which might be very useful for your preparation

The Data Monk Youtube channel – Here you will get only those videos that are asked in interviews for Data Analysts, Data Scientists, Machine Learning Engineers, Business Intelligence Engineers, Analytics Manager, etc.
Go through the watchlist which makes you uncomfortable:-

All the list of 200 videos
Complete Python Playlist for Data Science
Company-wise Data Science Interview Questions – Must Watch
All important Machine Learning Algorithm with code in Python
Complete Python Numpy Playlist
Complete Python Pandas Playlist
SQL Complete Playlist
Case Study and Guesstimates Complete Playlist
Complete Playlist of Statistics

About TheDataMonkGrand Master

I am the Co-Founder of The Data Monk. I have a total of 6+ years of analytics experience 3+ years at Mu Sigma 2 years at OYO 1 year and counting at The Data Monk I am an active trader and a logically sarcastic idiot :)

Follow Me