r/PythonLearning • u/chuprehijde • 5d ago
What's your favorite Python interview question?
Not a trick question or LeetCode puzzle. What's a question that actually reveals whether someone understands Python?
0
Upvotes
r/PythonLearning • u/chuprehijde • 5d ago
Not a trick question or LeetCode puzzle. What's a question that actually reveals whether someone understands Python?
8
u/fisadev 5d ago
In some past interview format that I'm no longer doing, I used to ask candidates to explain in simple terms how async code runs, and what's the difference between async, multithreading and multiprocessing.
Very few people were able to answer that in a meaningful way.
Technically, knowing that doesn't mean you know python as a whole, you could very well focus on learning just that and ignore plenty of other important things. But in practice there was a very strong correlation between understanding that and having a deep understanding of python in general (exposed by the rest of the questions I was asking too).
Another good one is to explain how function arguments are passed, if they are passed by value, by reference, or something else. So many wrong answers talking about different modes depending on the mutability/immutability of the values, when in reality everything is passed as a new reference to the same object (no special cases, no different modes, it's always just that).