O'Reilly logo

Python: Visual QuickStart Guide, Third Edition by Toby Donaldson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3. Writing Programs

Up to now, we’ve been writing single Python statements and running them at the interactive command line. While that’s useful for learning about Python functions, it quickly becomes tiresome when you need to write many lines of Python code.

Thus we turn to writing programs (also known as scripts). Programs are just text files containing a collection of Python commands. When you run (or execute) a program, Python performs each statement in the file one after the other.

In this chapter, we’ll learn how to write and run programs in IDLE and from the command line. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required