Python Interview Questions
Python is the first thing nearly every data interview tests, usually around strings, hashing and arrays. These 45+ questions come from 26 companies. Start solving and check your level of preparation.
By topic
By company
All the questions
- Anagram checkPython
Etsyeasy - Any duplicate transaction ids?Python
Visaeasy - Best week of salesPython
Targeteasy - Busiest request hourPython
Lyfteasy - FactorialPython
Googleeasy - Find a price in a sorted listPython
Best Buyeasy - First item bought twicePython
Instacarteasy - First unique characterPython
Amazoneasy - FizzBuzzPython
Microsofteasy - Longest streak of successful paymentsPython
Stripeeasy - Lowest and highest farePython
Lyfteasy - Merge sales by regionPython
Targeteasy - Merge sorted delivery timesPython
DoorDasheasy - Mirror promo codesPython
Airbnbeasy - Missing order numberPython
Walmarteasy - Move zero-sale days to the endPython
Best Buyeasy - Normalize hashtagsPython
Pinteresteasy - Price changes month to monthPython
Zilloweasy - Remove duplicates, keep the orderPython
Netflixeasy - Reverse the wordsPython
LinkedIneasy - Rotate a shift schedulePython
Walmarteasy - Split requests into batchesPython
Stripeeasy - Balanced bracketsPython
Salesforcemedium - Best single tradePython
Robinhoodmedium - Best stretch of daysPython
Robinhoodmedium - Compress a status logPython
Ubermedium - Customers who came backPython
Targetmedium - First and last position of a userPython
Metamedium - Flatten a category treePython
Amazonmedium - Group anagramsPython
Pinterestmedium - Invert team assignmentsPython
Capital Onemedium - Kth largest orderPython
Instacartmedium - Longest run of consecutive daysPython
Pelotonmedium - Merge viewing sessionsPython
Netflixmedium - Most common review wordPython
Etsymedium - Most visited locationPython
DoorDashmedium - Read a nested settingPython
Mastercardmedium - Sort employee recordsPython
Workdaymedium - Top pin categoriesPython
Pinterestmedium - Two homes that match a budgetPython
Zillowmedium - Where a new price fitsPython
Zillowmedium - Which products repeat?Python
Wayfairmedium - Longest palindrome in a namePython
Airbnbhard - Longest trip without repeat citiesPythonPremium
Airbnbhard - Search a rotated schedulePythonPremium
Uberhard - Stretches that hit a targetPythonPremium
DoorDashhard - Three transactions that cancel outPython
Stripehard - Two episodes before landingPython
Netflixhard
Questions last reviewed 19 October 2026.