1. Home
  2. Data Science
  3. Python
  4. What does sys.argv contain in Python?

Added 25 Nov 2026

What does sys.argv contain in Python?

  1. System variables
  2. Command-line arguments passed to the script Correct answer
  3. Python version
  4. Imported modules

Correct answer

B. Command-line arguments passed to the script

5 views

MCQSEXAM

Explanation

sys.argv[0] is the script name, followed by its arguments.

Reference

Asked in: Python Interview Advanced Python

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

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? 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