Python Software Engineer Interview Questions

6,409 python software engineer interview questions shared by candidates

1.Which framework(s) have you used in your current project? 2.Can you explain what decorators are in Python and provide an example of their use? 3.What are constructor methods in Python (such as __init__), and how are they used? 4.Have you worked with CI/CD pipelines? If so, can you describe your experience with tools such as Jenkins or GitHub Actions? 5.How would you handle strings and pattern matching in Python? 6.Since Python data types are implemented as classes, what are some of the built-in methods available in the str (string) class? Can you name and explain a few examples? 7.Can you write code to solve a problem without using slicing, indexing, or built-in string/list functions? For example: reversing a string or extracting elements. 8.Suppose you have a list of numbers (e.g., 1–10). How would you separate the even numbers and odd numbers into two different lists? 9.How would you solve the same problem using list comprehensions in Python? 10.What are fixtures in a testing framework like pytest, and why are they used? 11.What are markers in pytest, and how do you use them in test cases? 12.Can you explain the difference between instance methods and static methods in Python, and describe scenarios where each would be appropriate? 13.What is the purpose of the setUp method in a testing framework (e.g., unittest), and how does it work?
avatar

Python Automation Engineer

Interviewed at Moolya Software Testing

3.7
Sep 28, 2025

1.Which framework(s) have you used in your current project? 2.Can you explain what decorators are in Python and provide an example of their use? 3.What are constructor methods in Python (such as __init__), and how are they used? 4.Have you worked with CI/CD pipelines? If so, can you describe your experience with tools such as Jenkins or GitHub Actions? 5.How would you handle strings and pattern matching in Python? 6.Since Python data types are implemented as classes, what are some of the built-in methods available in the str (string) class? Can you name and explain a few examples? 7.Can you write code to solve a problem without using slicing, indexing, or built-in string/list functions? For example: reversing a string or extracting elements. 8.Suppose you have a list of numbers (e.g., 1–10). How would you separate the even numbers and odd numbers into two different lists? 9.How would you solve the same problem using list comprehensions in Python? 10.What are fixtures in a testing framework like pytest, and why are they used? 11.What are markers in pytest, and how do you use them in test cases? 12.Can you explain the difference between instance methods and static methods in Python, and describe scenarios where each would be appropriate? 13.What is the purpose of the setUp method in a testing framework (e.g., unittest), and how does it work?

Core Python FastAPI backend (auth, DB, architecture, async, middleware, DI, JWT) SQL + MySQL System design for backend roles Real project explanation (your Self Service Portal project) Debugging + logical thinking Scenario-based questions
avatar

Python Developer

Interviewed at Capgemini

4.2
Nov 14, 2025

Core Python FastAPI backend (auth, DB, architecture, async, middleware, DI, JWT) SQL + MySQL System design for backend roles Real project explanation (your Self Service Portal project) Debugging + logical thinking Scenario-based questions

Viewing 2111 - 2120 interview questions

Glassdoor has 6,409 interview questions and reports from Python software engineer interviews. Prepare for your interview. Get hired. Love your job.