Title: Python Command Line Arguments with sys.argv
Open Graph Title: Python Command Line Arguments with sys.argv
X Title: Python Command Line Arguments with sys.argv
Description: Read command line arguments with sys.argv and turn them into numbers with argparse. See how to pass values to a Python program from the terminal.
Open Graph Description: Read command line arguments with sys.argv and turn them into numbers with argparse. See how to pass values to a Python program from the terminal.
X Description: Read command line arguments with sys.argv and turn them into numbers with argparse. See how to pass values to a Python program from the terminal.
Opengraph URL: https://pythonprogramminglanguage.com/command-line-arguments/
Domain: pythonprogramminglanguage.com
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://pythonprogramminglanguage.com/#website",
"url": "https://pythonprogramminglanguage.com/",
"name": "Python Programming Language",
"description": "Free Python tutorials with clear explanations and code you can run.",
"inLanguage": "en",
"publisher": {
"@id": "https://pythonprogramminglanguage.com/#org"
}
},
{
"@type": "Organization",
"@id": "https://pythonprogramminglanguage.com/#org",
"name": "pythonprogramminglanguage.com",
"url": "https://pythonprogramminglanguage.com/",
"logo": {
"@type": "ImageObject",
"url": "https://pythonprogramminglanguage.com/images/og-default.png",
"width": 1200,
"height": 630
}
},
{
"@type": "BreadcrumbList",
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/#breadcrumb",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://pythonprogramminglanguage.com/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Command line arguments",
"item": "https://pythonprogramminglanguage.com/command-line-arguments/"
}
]
},
{
"@type": "TechArticle",
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/#article",
"isPartOf": {
"@id": "https://pythonprogramminglanguage.com/#website"
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/"
},
"headline": "Python Command Line Arguments with sys.argv",
"name": "Command line arguments",
"description": "Read command line arguments with sys.argv and turn them into numbers with argparse. See how to pass values to a Python program from the terminal.",
"inLanguage": "en",
"image": [
"https://pythonprogramminglanguage.com/images/og-default.png"
],
"datePublished": "2017-01-17",
"dateModified": "2026-10-01",
"wordCount": 344,
"proficiencyLevel": "Beginner",
"articleSection": "Modules and tools",
"author": {
"@id": "https://pythonprogramminglanguage.com/#org"
},
"publisher": {
"@id": "https://pythonprogramminglanguage.com/#org"
}
},
{
"@type": "WebPage",
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/#webpage",
"url": "https://pythonprogramminglanguage.com/command-line-arguments/",
"name": "Python Command Line Arguments with sys.argv",
"description": "Read command line arguments with sys.argv and turn them into numbers with argparse. See how to pass values to a Python program from the terminal.",
"isPartOf": {
"@id": "https://pythonprogramminglanguage.com/#website"
},
"inLanguage": "en",
"breadcrumb": {
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/#breadcrumb"
},
"mainEntity": {
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/#faq"
}
},
{
"@type": "FAQPage",
"@id": "https://pythonprogramminglanguage.com/command-line-arguments/#faq",
"mainEntity": [
{
"@type": "Question",
"name": "What are command line arguments in python?",
"acceptedAnswer": {
"@type": "Answer",
"text": "They are the values you type after the program name, and Python puts them in sys.argv as a list of strings."
}
}
]
}
]
}
| theme-color | #4184f3 |
| og:type | article |
| og:site_name | Python Programming Language |
| og:locale | en_US |
| og:image | https://pythonprogramminglanguage.com/images/og-default.png |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:image:alt | pythonprogramminglanguage.com, free Python tutorials with runnable code examples |
| article:published_time | 2017-01-17T00:00:00+00:00 |
| article:modified_time | 2026-10-01T00:00:00+00:00 |
| article:section | Modules and tools |
| twitter:card | summary_large_image |
| twitter:image | https://pythonprogramminglanguage.com/images/og-default.png |
Links:
Viewport: width=device-width, initial-scale=1
Robots: index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1