codetutor.
YOUR LEARNING SPACE / BEGINNER

Understanding sys.argv in Python

How to use command-line arguments in Python.

◷ 1 min
A CODETUTOR MINI-LESSON

Understanding sys.argv in Python

How to use command-line arguments in Python.

CHAPTER 01

Welcome to this lesson on using command-line arguments in Python. We'll explore how to read and use arguments passed to your script.

Use ← → anywhere on this page to change slides
VIDEO EXPORT · NARRATED

Narrated lesson video

Download MP4
FOLLOW ALONG

Lesson transcript

8 moments
YOUR TURN

Ready to try one?

Practice what you just learned with a short exercise made for this lesson.