Python: Which statement about subprocess and Shell Boundary Safety is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about subprocess and Shell Boundary Safety is the strongest interview answer?

  1. subprocess and Shell Boundary Safety is mostly a naming style choice and has little effect on runtime behavior or design tradeoffs.
  2. subprocess runs external programs and should be treated as a boundary with explicit arguments, return codes, and error handling.
  3. subprocess and Shell Boundary Safety exists mainly to reduce the number of files in a Python project.
  4. subprocess and Shell Boundary Safety matters only for frontend scripting and not for backend or automation code.

Hint

Start with the core rule behind subprocess and Shell Boundary Safety.

Answer and rationale

Correct answer: B. subprocess runs external programs and should be treated as a boundary with explicit arguments, return codes, and error handling.

subprocess runs external programs and should be treated as a boundary with explicit arguments, return codes, and error handling. This is the base concept interviewers commonly test first.

Track: Python