Now that you know some basics, you could write your own programs. But writing code line-by-line makes it hard to do more interesting and complicated things. Next, we’ll learn some of the control structures that make your program interactive, responsive, repetitive, and generally more complex!

Whitespace

Spacing is very important in Python. In some languages, you have to use semicolons ;, curly brackets {}, and other symbols to mark the beginning or end of a chunk of code. Python saves you some typing time by leaving out those characters and using whitespace instead. Whitespace includes spaces, tabs, and line breaks.

In Python, a line break (hitting Enter) ends a line of code. Spaces or tabs at the beginning of a line of code help group that line with other similarly indented lines.

I’ll show you how the control structures you learn about use whitespace. Make sure you pay attention to your line breaks and indentation.