Python Interview Questions

6,382 python interview questions shared by candidates

10. If I have a code block within "catch" and "finally" block, whether and when this code will execute if: - no exception is thrown by the try block - exception thrown is caught in the catch block - exception thrown is not caught in the catch block (or the catch block is absent, the code block in question is after the end of "try" block, and before the start of "finally" block.
avatar

Python Development Engineer

Interviewed at Calsoft

4.3
Jun 8, 2017

10. If I have a code block within "catch" and "finally" block, whether and when this code will execute if: - no exception is thrown by the try block - exception thrown is caught in the catch block - exception thrown is not caught in the catch block (or the catch block is absent, the code block in question is after the end of "try" block, and before the start of "finally" block.

🔗 SECTION 4: API Design (7 Qs) 1. Explain REST principles. Stateless, resource-based URIs, HTTP verbs, uniform interface, cacheable responses. 2. How to version APIs? Via URL /api/v1/users/ or header Accept: application/vnd.company.v1+json. 3. How to secure APIs? Use JWT/OAuth2, HTTPS, rate limiting, API key verification. 4. Difference between PUT and PATCH. PUT replaces full resource, PATCH updates part. 5. Write Flask API endpoint.
avatar

Python Developer

Interviewed at iHub

3.6
Oct 16, 2025

🔗 SECTION 4: API Design (7 Qs) 1. Explain REST principles. Stateless, resource-based URIs, HTTP verbs, uniform interface, cacheable responses. 2. How to version APIs? Via URL /api/v1/users/ or header Accept: application/vnd.company.v1+json. 3. How to secure APIs? Use JWT/OAuth2, HTTPS, rate limiting, API key verification. 4. Difference between PUT and PATCH. PUT replaces full resource, PATCH updates part. 5. Write Flask API endpoint.

Viewing 5821 - 5830 interview questions

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