Local variables are safer than global variables, so use local variables as much as
possible.
Break your programs into lots of functions to ease maintenance and speed
development time.
Don’t define global variables in the middle of a program. They’re too hard to locate
if you do.
Don’t start out using global variables. As your program grows, you might
occasionally see the need for a global variable—add one then. (The next chapter
talks more about using local variables in place of globals.)