Variables

What is a variable?

In Python, a variable is a name attached to a piece of data.

Why are variables important?

Variables are important for when you first define them, and then their name is used when you refer to that piece of data.

What is a statically typed language?

In statically typed languages, you must declare the type of data a variable represents when you define it. Static languages prioritize processor efficiency over the time of a programmer. Programs are longer and more expressed in static languages, but can be highly optimized.

What is a dynamically typed language?

Dynamic languages prioritize a programmer's time over efficient use of the processor, but they can still be efficient and fast when properly used.

What makes Python a dynamic language?

Python is a dynamically typed language, meaning you don't have to declare the kind of data a variable will represent. In Python, the interpreter examines the data associated with the variable thoughout the program's life and manages type issues for you.