APython Keywords

Image

Keywords in Python (and most programming languages) are words that have special meaning. They are used as part of the programming language itself, and therefore must not be used for anything else. For example, if you try to use keywords as variables, or use them in the wrong way, you’ll get strange error messages from the Python console. This appendix describes each of the Python keywords. You should find this to be a handy reference as you continue to program.

and

The keyword and is used to join two expressions together in a statement (like an if statement) to say that both expressions must be true. Here’s an example:

if age ...

Get Python for Kids, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.