The command line arguments in Python can be printed as a list of string by…
2025
The command line arguments in Python can be printed as a list of string by executing
- A.
OS.argv
- B.
Sys.argv
- C.
.argv
- D.
None of these
Attempted by 41 students.
Show answer & explanation
Correct answer: B
In Python, command line arguments are accessed using the sys module. The list of arguments is stored in the argv attribute, written as sys.argv.