Chapter 3
Python Elements and Syntax
IN THIS CHAPTER
The Zen of Python
Understanding object-oriented programming
Indentations count, big time
Using Python modules
Many programming languages focus on things that the computer does and how it does them rather than on the way humans think and work. This one simple fact makes most programming languages difficult for most people to learn. Python is different in that’s is based on the philosophy that a programming language should be geared more toward how humans think, work, and communicate than what happens inside the computer. The Zen of Python is the perfect example of that human orientation, so we start this chapter with that.
The Zen of Python
The Zen of Python is a list of guiding principles for the design of the Python language. (See Figure 3-1.) These principles are actually hidden in an Easter egg (a slang term for something in a programming language or app that's not easy to find and that serves as a bit of an inside joke to people who have learned enough Python to be able to find it). To get to the Easter egg, follow these ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access