# Command-Line Argument

*noun*

say it: **“kuh-MAND LYNE AR-gyoo-ment”** **/kəˈmænd ˈlaɪn ˈɑrɡjəmənt/**

A word typed after a program's name when it's started from the terminal, which the program reads to know what to work on.

## What is a **command-line argument** in Python?

A **command-line argument** is a word typed after a script's name when you start it, such as a folder name. The
script reads it from `sys.argv` or with `argparse`.

```bash
python sort_downloads.py Downloads --dry-run
# two command-line arguments: Downloads and --dry-run
```

## In a sentence

- “She passed the number of days as a **command-line argument**.”
- “The folder to sort is a **command-line argument**, so the script works on any folder.”

Level: Apprentice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=2)

Updated: November 19, 2026

## In other subjects

- [Command-Line Argument in Java](https://www.ask-codey.com/glossary/command-line-argument)

Source: https://www.ask-codey.com/glossary/command-line-argument-python
