© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. WilsonThe Absolute Beginner's Guide to Python Programminghttps://doi.org/10.1007/978-1-4842-8716-3_3

3. Working with Data

Kevin Wilson1  
(1)
London, UK
 

You can store and manipulate all different types of data: a number, a string, list, and so on. With Python, you don't need to declare all your variables before you use them.

Variables

A variable is a labeled location in memory that is used to store values within a computer program. There are two types of variables: local and global.

Local Variables

Variables defined within a function are called local variables , as they are local to that particular function. These variables can only be seen by the function ...

Get The Absolute Beginner's Guide to Python Programming: A Step-by-Step Guide with Examples and Lab Exercises 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.