python Interview Questions
28 interview questions in our bank cover python, most of them Coding & Leetcode-style Questions. They average 3.0/5 difficulty — medium — and each one was reported by a candidate after a real interview. Companies known to ask about python: Figma, Stripe, Shopify, Intuit, Salesforce, and 15 more.
Practice these on the problems board →Companies that ask about python
Question mix
- Coding & Leetcode-style Questions26
- Deep Learning & Architectures1
- LLMs & Prompt Engineering1
Difficulty
- 2/5 — easy3
- 3/5 — medium21
- 4/5 — hard4
Questions tagged python
ModalLock and FairModalLock
4/5Explore advanced concurrency concepts with this Python synchronization problem frequently utilized in machine learning infrastructure interviews at OpenAI. You are tasked with implementing specialized locking primitives that manage thread access across distinct operational modes while preventing thread starvation through FIFO fairness guarantees. This exercise examines your mastery of low-level concurrency controls, condition variables, and thread coordination. Unlock the complete problem specifications and the reference model solution with a paid subscription.
Coding & Leetcode-style QuestionsOpenAIML Coding — BERT Span / Keyphrase Extraction
3/5In this hands-on machine learning coding challenge reported at Figma, applicants work within a notebook environment to build a transformer-based span extraction pipeline. The task assesses practical PyTorch skills by requiring the implementation of model architecture initialization, custom loss calculations, and training loops to successfully locate key phrases within text data. Mastering sequence tagging tasks is essential for modern natural language processing roles. Unlock the full implementation guide and verified solution by subscribing today.
Deep Learning & ArchitecturesFigmaColander Validation Debugging Round
4/5Navigate a live codebase debugging challenge centered around data validation logic, reflecting real-world engineering problem-solving at Stripe. You will investigate a serialization library where nested rules or custom validators fail to process edge-case payloads correctly. The goal is to rapidly reproduce the failure, isolate the root cause, and implement a precise, minimal patch under strict time constraints. Unlock the full diagnostic walkthrough and correct implementation details with a paid subscription.
Coding & Leetcode-style QuestionsStripeMultithreaded BankAccount Race-Condition Bug Hunt
2/5This xAI coding challenge investigates concurrency vulnerabilities by presenting a flawed financial account implementation prone to classic multithreading hazards. Candidates must identify timing defects and demonstrate safe encapsulation patterns to prevent data corruption during simultaneous updates. Unlocking the complete troubleshooting guide and model code requires a subscription.
Coding & Leetcode-style QuestionsxAIRAG Notebook (ML Coding)
3/5During a machine learning coding evaluation reported at Harvey, candidates complete a practical notebook exercise centered on building a simple retrieval augmented generation pipeline. The task involves processing tabular data with pandas to generate text embeddings, executing similarity searches to retrieve relevant context, and running evaluation metrics using provided utility functions within a collaborative environment. Unlock the complete coding challenge requirements, starter code explanations, and expert model solutions with a paid subscription.
LLMs & Prompt EngineeringHarveyMars Rover / Robot Controller (CLI)
3/5This widely reported pair-programming exercise from Shopify challenges engineers to build a command-line interface application that simulates a robotic rover navigating a two-dimensional grid space. Candidates must implement directional state tracking, movement mechanics, and boundary processing based on sequential instructions while gracefully handling edge cases. Although the initial specifications appear straightforward, the real evaluation centers around extensibility, clean object-oriented architecture, and handling complex follow-up requirements. The complete problem statement, testing strategies, and expert reference solution are exclusively available to paid subscribers.
Coding & Leetcode-style QuestionsShopifyML Intern OA (CodeSignal: MCQ + NN Forward + Coding + ML Implementations)
3/5Featured in Pinterest machine learning intern assessments, this multi-part evaluation covers theoretical concepts, manual neural network computations, and practical coding tasks. Candidates must demonstrate fluency across classification metrics, regularization diagnostics, loss functions, and fundamental algorithm implementations built from scratch without external libraries. The assessment tests both your theoretical foundations and your coding agility under timed conditions. Access to the full exam breakdown, detailed questions, and model solutions requires a subscription.
Coding & Leetcode-style QuestionsPinterestDocument / Layer — Apply, Undo, Commit Batch, Redo
3/5Master state management and command patterns with this popular Figma technical interview exercise. Candidates are asked to construct a hierarchical document model containing customizable layers, then implement functionality for property adjustments, rollbacks, grouped batch operations, and forward execution. While the underlying computational logic remains straightforward, success hinges on designing a pristine object architecture capable of handling intricate specifications cleanly. To explore the complete problem statement and review an optimized reference implementation, an active platform subscription is required.
Coding & Leetcode-style QuestionsFigmaAnalytics Engineer: SQL + Python Sessionization
3/5Practice dual-domain data processing combining advanced relational database queries and Python-based sessionization algorithms, highlighted in analytics engineering loops at Robinhood. This problem tests your ability to handle sharded datasets with complex join conditions and group event logs into distinct time-capped sessions. It is designed to evaluate practical data transformation skills used in production data pipelines. The full problem documentation, datasets, and complete model solutions require an active subscription.
Coding & Leetcode-style QuestionsRobinhoodImplement a Vending Machine with Bill Insertion and Change-Making (OOD)
3/5In this classic object-oriented design problem reported during Zip interviews, you are expected to architect a fully functional automated transaction system. The challenge requires modeling real-world interactions such as accepting various currency denominations, tracking balances, dispensing products, and returning accurate change. It measures your capability to write clean, extensible code adhering to solid design principles while structuring classes effectively. Gain immediate access to the architectural blueprint, design patterns, and complete model implementation with an active subscription.
Coding & Leetcode-style QuestionsZipWeather Data Energy-Usage Ranking
3/5Presented during Intuit applied data science screens, this practical analytics challenge requires you to process historical meteorological observations to estimate and rank residential utility consumption patterns. You must formulate a defensible mathematical proxy using temperature and precipitation metrics to evaluate heating and cooling burdens across multiple days. It tests your data wrangling abilities and feature engineering judgment. Access the full dataset context, evaluation criteria, and model solution by subscribing.
Coding & Leetcode-style QuestionsIntuitData Engineer Screen — SQL Collaborator Model + IPv4 Validation
3/5This data engineering technical screen, featured at Figma, evaluates proficiency in both relational database querying and string manipulation. The first portion involves analyzing user activity logs to identify initial design shares and modeling close collaborator relationships, while the second part requires parsing and validating network address strings. The complete problem requirements, dataset schema, and model solutions are available exclusively to subscribers.
Coding & Leetcode-style QuestionsFigmaImplement a Coroutine Step by Step
3/5Reported as an interview challenge at Hudson River Trading, this exercise evaluates your grasp of generator functions and stateful execution in Python. You are asked to construct a lightweight coroutine capable of accepting runtime numeric inputs, maintaining a running cumulative total, and providing graceful termination handling. Success depends on utilizing generator syntax effectively to preserve internal state between external data transmissions. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsHudson River TradingTime-Keyed Key-Value Store (set - get-before-timestamp)
3/5Featured in a Citadel coding interview, this problem requires you to build a specialized versioned data structure that handles historical lookups efficiently. You will implement record-keeping and retrieval methods that fetch the most relevant data point preceding or matching a specific temporal query. The exercise tests your mastery of ordered collections and binary search techniques on monotonic data streams. Unlock the full problem details and efficient model solution with a subscription.
Coding & Leetcode-style QuestionsCitadelMako Template Engine Debugging Round
4/5This Stripe live debugging round drops you into the actual open-source Mako Python templating codebase to diagnose and resolve subtle defects under a strict time limit. Rather than testing raw algorithm creation, it evaluates your systematic troubleshooting methodology, stack trace interpretation, and ability to land safe, isolated code corrections. Access to the complete debugging environment setup, scenario briefs, and expert resolution strategies requires a subscription.
Coding & Leetcode-style QuestionsStripePandas Meeting Work-Duration Calculation
3/5Handling temporal data and interval merging is a practical skill tested heavily in data-centric engineering roles, as seen in Intuit interview questions. This task requires parsing timestamp logs, grouping schedules by individual and date, consolidating overlapping time slots to prevent double-counting, and computing maximum daily workloads. It tests your ability to manipulate structured datasets and apply interval algorithms effectively. To view the complete problem details, optimal data-frame strategies, and reference code, a subscription is required.
Coding & Leetcode-style QuestionsIntuitOnsite Mini Project — Concurrent Web Crawler
3/5Prepare for high-pressure system design rounds with this Salesforce onsite hands-on mini project, which requires building a concurrent web scraper under tight time constraints. You will need to demonstrate live coding proficiency, manage asynchronous requests, process and sort data according to strict criteria, and generate CSV exports while clearly narrating your thought process. Unlock the full project specifications and a production-grade model solution with a subscription.
Coding & Leetcode-style QuestionsSalesforceCode Review OA — Python Files (Salesforce / Slack)
3/5This Salesforce and Slack joint assessment tests your code comprehension and software evaluation abilities in a realistic take-home format. You will inspect a small codebase containing Python scripts and database interactions to uncover hidden defects, architectural flaws, and maintainability concerns. The task measures your attention to detail and ability to communicate professional engineering feedback effectively. Gain full access to the source repository overview and the complete grading rubric by purchasing a subscription.
Coding & Leetcode-style QuestionsSalesforceData Engineer AI-Native Full-Stack Round
4/5This comprehensive Meta data engineering interview round simulates a high-stakes scenario combining business case evaluation, dimensional data modeling, and SQL debugging within a single session. It evaluates end-to-end data architecture expertise, problem-solving under constraints, and analytical communication. The full prompt, database schemas, and expert model solutions require a subscription.
Coding & Leetcode-style QuestionsMetaReverse Each Line in a File and Write to Another File
2/5Solve a practical file processing task frequently featured in Fortinet coding screenings. This exercise requires you to write clean, idiomatic Python code that reads text from a designated source, processes individual lines by reversing their character sequences, and outputs the transformed data to a new destination. It tests your fundamental file I/O handling, string manipulation skills, and script reliability under standard constraints. Access the complete problem description and professional solution scripts with a subscription.
Coding & Leetcode-style QuestionsFortinetRetrieve Text Values of Two Web Elements Using Selenium
3/5Featured in Glean engineering interviews, this practical test requires you to write robust browser automation code using Selenium to extract text content from specific page elements. You must handle dynamic loading conditions by implementing appropriate wait strategies before retrieving the requested text strings safely. It effectively tests your familiarity with web testing frameworks and asynchronous element handling. Unlock the complete problem prompt and expert automation script by securing a subscription.
Coding & Leetcode-style QuestionsGleanFigJam Table — Selection & Set Color
3/5This frontend system design challenge, frequently encountered in technical interviews at Figma, requires you to architect a flexible digital canvas table component that handles hierarchical selection states and layered visual properties. You will need to implement data structures and simulation logic that correctly resolve style overrides across entire grids, individual rows, and specific cells as user selections shift. This question evaluates your proficiency in object-oriented modeling, state management, and clean API design for interactive applications. Access the full architectural requirements and reference implementation by obtaining a subscription.
Coding & Leetcode-style QuestionsFigmaCode Review — Multi-PR Walkthrough
3/5In this interactive Airbnb interview round, candidates are placed in the role of a reviewer examining multiple pull requests of escalating complexity and architectural depth. You are expected to proactively lead the review, spot subtle logic bugs, highlight maintainability concerns, and suggest missing test coverage without relying on interviewer prompts. This evaluation measures your code craftsmanship, communication clarity, and software design intuition. Read the full walkthrough guide and expert evaluation criteria by securing a paid subscription.
Coding & Leetcode-style QuestionsAirbnbFix Python for-loop and indentation syntax errors
2/5This InterSystems technical assessment tests your foundational knowledge of Python syntax, focusing on proper loop construction, conditional statements, and indentation rules. The exercise evaluates your attention to detail in spotting missing syntax elements and correcting structural formatting. You will learn how to troubleshoot common compilation hurdles typical in beginner-level scripts. Unlock the complete debugging walkthrough and correct code snippet with a subscription.
Coding & Leetcode-style QuestionsInterSystemsWebsite Activity Analytics: Unique Users + Session Time
3/5This reported Google coding interview challenge evaluates your ability to process web log data effectively. You are asked to compute distinct visitor totals for various actions alongside calculating the average duration users spend browsing the platform. The exercise tests your data aggregation skills and requires careful handling of edge cases rather than just pristine code. The complete problem statement, underlying logic, and verified model solution require a subscription.
Coding & Leetcode-style QuestionsGooglePython + SQL Technical Round (Typing, Debugging, Joins)
3/5Prepare for a senior engineering technical evaluation modeled after real-world Okta interview assessments. This multi-faceted discussion spans core language competencies, including static typing annotations, bug fixing, performance complexity analysis, and database querying via relational joins. It is designed to evaluate your deep technical fluency and architectural communication skills across backend domains. Unlock the complete breakdown of discussion points, code snippets, and expert answers by securing a subscription.
Coding & Leetcode-style QuestionsOktaRequests Library Debugging Round
3/5In this Stripe debugging challenge, you are tasked with diagnosing and resolving subtle failure modes within Python HTTP networking libraries. You must investigate anomalous behavior involving protocol redirects, header encodings, or retry policies, and craft a minimal, robust patch under time constraints. This scenario tests your troubleshooting methodology and familiarity with network request lifecycles. Viewing the complete diagnostic details and reference fix requires a subscription.
Coding & Leetcode-style QuestionsStripeURL Shortener Service (CLI)
3/5Designed around a Shopify technical screen, this coding and system design task requires you to build a functional command-line URL encoding and resolution utility. While the algorithmic core is lightweight, the exercise heavily emphasizes robust object-oriented design, collision mitigation strategies, persistence choices, and thorough testing protocols. Unlock the complete requirements, architecture guidance, and reference implementation by subscribing.
Coding & Leetcode-style QuestionsShopify
Studied alongside
python interview FAQ
- How many python interview questions are there?
- 28 reported questions, mostly Coding & Leetcode-style Questions.
- Which companies ask python questions?
- Figma (4), Stripe (3), Shopify (2), Intuit (2), Salesforce (2), OpenAI (1), xAI (1), Harvey (1).
- How hard are python questions?
- They average 3.0 out of 5: 3 at 2/5, 21 at 3/5, 4 at 4/5.