Back to Interview Hub

Python Questions

Data structures, algorithms, decorators, and Django/FastAPI basics.

Showing 1-6 of 26 questions

1 / 5
1QuestionsHard🔥 95% Asked

How to make code thread-safe?

Asked in:LinkedInGoogleAmazonAtlassian

Avoid shared mutable state, use mutex/atomic, design ownership clearly, and avoid data races.

Page 8

2QuestionsEasy🔥 41% Asked

What is Python?

Asked in:MicrosoftFlipkartWalmartTwitter

Python is an interpreted high-level language used for web, automation, data, AI, scripting, and backend services.

3QuestionsEasy🔥 57% Asked

List vs tuple?

Asked in:GoogleAtlassianAmazon

List is mutable. Tuple is immutable. Tuples are useful for fixed data and can be hashable if all elements are hashable.

4QuestionsMedium🔥 70% Asked

What are decorators?

Asked in:UberTwitter

Decorators wrap functions/classes to add behavior without changing original code, used for logging, auth, caching.

Note: You might also find it helpful to explore the Brightness Slider or discover the Invisible Notepad.

5QuestionsMedium🔥 62% Asked

Generator vs list?

Asked in:CiscoApple

Generator yields items lazily and saves memory. List stores all items immediately.

6QuestionsMedium🔥 69% Asked

What is GIL?

Asked in:RazorpayNetflixLinkedInAdobe

Global Interpreter Lock allows only one thread to execute Python bytecode at a time in CPython, affecting CPU-bound threads.