E. Statement Reference
This appendix covers a number of basic syntax issues in the Python language, except for operators, important methods, and built-in functions, each of which is covered elsewhere. The contents covered here include
Variables and assignments
Spacing issues in Python
Alphabetical statement reference
Variables and Assignments
There are no data declarations in Python, not even for non-simple types such as multidimensional lists. Classes and functions are defined at run time, but otherwise, objects such as lists, sets, and dictionaries must be built rather than declared.
Variables are created by assignments. They can also be created by for
loops. Within function definitions, arguments create variables with local scope. But ...
Get Supercharged Python: Take Your Code to the Next Level, First 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.