Threads or processes in Python for a data job?

EasyConcept10 minSWEMLE

The question

You need to speed up a Python script that parses millions of files. Would you use threads or processes, and why? Explain the GIL.

What the interviewer is looking for

  • Explains the GIL blocks parallel Python bytecode
  • Threads help for I/O bound work
  • Processes help for CPU bound work
  • Mentions serialization cost between processes

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Reported in: nowcoder.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official StepFun question.