Chapter 7. Recycling Your Code with Functions and Modules

Think about how much stuff you throw away each day: water bottles, soda cans, potato chip bags, plastic sandwich wrappers, bags that held carrot sticks or apple slices, shopping bags, newspapers, magazines, and so on. Now imagine what would happen if all of that trash just got dumped in a pile at the end of your driveway, without separating out the paper, the plastic, and the tin cans.

Of course, you probably recycle as much as possible, which is good, because no one likes to climb over a pile of trash on the way to school. Rather than sitting in an enormous, gross pile, those glass bottles that you recycle are melted down and turned into new jars and bottles; paper is pulped into recycled ...

Get Python for Kids now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.