1. Home
  2. Data Science
  3. Python
  4. What does os.environ provide in Python?

Added 25 Nov 2026

What does os.environ provide in Python?

  1. A mapping of environment variables Correct answer
  2. The Python path
  3. The OS name
  4. A list of processes

Correct answer

A. A mapping of environment variables

5 views

MCQSEXAM

Explanation

os.environ['HOME'] reads environment variables.

Reference

Asked in: Python Interview Standard Library

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs