8VARIABLES

image

Variables are one of the most important concepts for beginning programmers to understand, so this chapter explores these features in detail. Technically speaking, a variable is a reserved memory location used to store values. It’s a reference, or pointer, to an object in memory, but it’s not the object itself. Variables let you access and manipulate each object’s associated metadata (attributes) and functionality (methods).

In the previous chapter, you learned how to assign variables. In this chapter, you’ll learn more about assignment statements, discover how to name variables clearly, use a built-in function to get a user’s input, ...

Get Python Tools for Scientists 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.